Skip to content

Instantly share code, notes, and snippets.

@MarksCode
Last active July 10, 2022 10:02
Show Gist options
  • Save MarksCode/863f6fb05f7f3ed473d7e39d2bf29427 to your computer and use it in GitHub Desktop.
Save MarksCode/863f6fb05f7f3ed473d7e39d2bf29427 to your computer and use it in GitHub Desktop.
My reusable zshenv
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/bash_profile.pre.bash" ]] && . "$HOME/.fig/shell/bash_profile.pre.bash"
precmd()
{
local NUMCHARS="$COLUMNS"
local CHAR="─"
printf '\e[37m%s\e[0m' "${(pl:$NUMCHARS::$CHAR:)}"
}
get_path()
{
if [[ "$1" == "~" ]]
then
echo "🏠"
else
echo "$1"
fi
}
alias sb='source ~/.bash_profile'
alias bp='code ~/.bash_profile'
alias gb='git branch'
alias gc='git checkout'
alias gs='git status'
alias ..='cd ..'
alias ...='cd ../..'
alias ~='cd ~'
alias mv='mv -i'
alias cp='cp -i'
export PATH=/opt/homebrew/bin:$PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/bash_profile.post.bash" ]] && . "$HOME/.fig/shell/bash_profile.post.bash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment