Skip to content

Instantly share code, notes, and snippets.

@Xerkus
Last active March 23, 2016 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Xerkus/0ed725df3d3b5138e716 to your computer and use it in GitHub Desktop.
Save Xerkus/0ed725df3d3b5138e716 to your computer and use it in GitHub Desktop.
Bash completion from history using up and down arrows
export HISTSIZE=""
if [ "$PS1" ]; then
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
fi
source /usr/share/git-core/contrib/completion/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
if [ "$(type -t __git_ps1)" ]; then
PS1='[\[\e[38;2;255;100;0m\]\u@\h\[\e[m\] \W\[\e[38;2;20;207;245m\]$(__git_ps1 " (%s)")\[\e[m\]]\$ '
fi
@Xerkus
Copy link
Author

Xerkus commented Dec 31, 2014

drop into /etc/profile.d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment