Skip to content

Instantly share code, notes, and snippets.

@chanshing
Last active May 23, 2022 21:32
Show Gist options
  • Save chanshing/c7c30e076eefc261de1405a40d2a60a7 to your computer and use it in GitHub Desktop.
Save chanshing/c7c30e076eefc261de1405a40d2a60a7 to your computer and use it in GitHub Desktop.
Minimal .bashrc with color prompt, git prompt & git autocomplete
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
# git prompt & autocomplete
. ~/git-prompt.sh
. ~/git-completion.bash
export GIT_PS1_SHOWDIRTYSTATE=1
# prompt
# MY_PROMPT='\u@\h'
MY_PROMPT='hello-world' # change this
PS1='\[\033[01;32m\]${MY_PROMPT}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s)")\$ '
# aliases
alias py='python'
alias ipy='ipython'
# press V for vi
set -o vi
export VISUAL=vi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment