Skip to content

Instantly share code, notes, and snippets.

@cfg
Last active December 14, 2015 05:59
Show Gist options
  • Save cfg/5039679 to your computer and use it in GitHub Desktop.
Save cfg/5039679 to your computer and use it in GitHub Desktop.
My cygwin .bashrc
# https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
source ~/git-prompt.sh
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
source ~/bash_completion.d/git-completion.bash
# https://github.com/bobthecow/git-flow-completion
source ~/bash_completion.d/git-flow-completion.bash
alias ll='ls -lah'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
PS1_WINDOWTITLE='\[\e]0;\w\a\]\n'
PS1_USER_HOST='\[\e[32m\]\u@\h \['
PS1_PATH='\e[33m\]\w\[\e[0m\]'
PS1_GIT='$(__git_ps1 " (%s)")'
PS1_PROMPT='\n\$ '
PS1="${PS1_WINDOWTITLE}${PS1_PATH}${PS1_GIT}${PS1_PROMPT}"
export PS1
# Show the current process in the titlebar
# See http://www.davidpashley.com/articles/xterm-titles-with-bash.html
if [ "$SHELL" = '/bin/bash' ]
then
case $TERM in
rxvt|*term)
set -o functrace
trap 'echo -ne "\e]0;$BASH_COMMAND - $PWD\007"' DEBUG
export PS1
;;
esac
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment