diff options
Diffstat (limited to 'public/zsh/.zprofile')
-rw-r--r-- | public/zsh/.zprofile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/public/zsh/.zprofile b/public/zsh/.zprofile new file mode 100644 index 0000000..2882524 --- /dev/null +++ b/public/zsh/.zprofile @@ -0,0 +1,20 @@ +# Mac specific hack to prepend to $PATH +# This is shit because it runs zshenv twice :/ +# https://stackoverflow.com/questions/59131915/zsh-path-variable-entries-are-backwards-on-os-x-catalina +if [ "$(uname -s)" = "Darwin" ]; then + [[ -f $HOME/.zshenv ]] && source $HOME/.zshenv + typeset -U PATH +fi + +function vim_wrap() { + [ -z "$VIMRUNTIME" ] && nvim "$@" || echo "no inception shit" +} + +function awsume() { + unset AWS_PROFILE + unset AWS_ACCESS_KEY_ID + unset AWS_SECRET_ACCESS_KEY + unset AWS_SESSION_TOKEN + source <(aws session-env --profile "$@") + export AWS_PROFILE=$1 +} |