Skip to content

Instantly share code, notes, and snippets.

@wkei
Last active October 15, 2018 03:43
Show Gist options
  • Save wkei/2e1d4def5846a993c9dca7ef230e60e0 to your computer and use it in GitHub Desktop.
Save wkei/2e1d4def5846a993c9dca7ef230e60e0 to your computer and use it in GitHub Desktop.
bash
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
alias ..="cd .."
alias ...="cd ../.."
alias ll="ls -hl"
alias vimrc="vim ~/.vimrc"
alias pp="pnpm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment