Skip to content

Instantly share code, notes, and snippets.

@lalyos
Created January 29, 2018 20:35
Show Gist options
  • Select an option

  • Save lalyos/cc9e6963a8b74fa15dba848c80381caf to your computer and use it in GitHub Desktop.

Select an option

Save lalyos/cc9e6963a8b74fa15dba848c80381caf to your computer and use it in GitHub Desktop.
bash prompt PS1 with actual git branch
export PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/')\$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment