From 449a6f57a36862a8ff27b2a3cee0922f4e4d949e Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Thu, 12 Oct 2023 14:23:49 +0200 Subject: Add zsh --- public/zsh/.zprofile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 public/zsh/.zprofile (limited to 'public/zsh/.zprofile') 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 +} -- cgit v1.2.3