diff options
author | Christian Segundo | 2023-10-12 14:23:49 +0200 |
---|---|---|
committer | Christian Segundo | 2023-10-12 14:23:49 +0200 |
commit | 449a6f57a36862a8ff27b2a3cee0922f4e4d949e (patch) | |
tree | c9d0d9f9d055e89a5046c75b613fc8bafea5715c /public/zsh/.zprofile | |
parent | 0b7186eac839b8690f8951aca4fc2657944ab3b6 (diff) | |
download | dotfiles-449a6f57a36862a8ff27b2a3cee0922f4e4d949e.tar.gz |
Add zsh
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 +} |