Skip to content

Instantly share code, notes, and snippets.

@tassoevan
Last active March 21, 2016 02:59
Show Gist options
  • Save tassoevan/22d70b95f5c806cfdc35 to your computer and use it in GitHub Desktop.
Save tassoevan/22d70b95f5c806cfdc35 to your computer and use it in GitHub Desktop.
#!/bin/bash PS1
title_part='\[\033]0;\u@\h:\w\007\]\n'
chroot_part='${debian_chroot:+($debian_chroot)}'
host_part='\[\033[01;32m\]\u@\h\[\033[00m\] '
directory_part='\[\033[01;34m\]\w\[\033[00m\] '
git_part='$(__git_ps1 "\e[01;37;45m %s \e[00m")\n'
prompt_part='\$ '
export PS1="${title_part}${chroot_part}${host_part}${directory_part}${git_part}${prompt_part}"
if [ "$SSH_TTY" ]; then
trap 'echo -ne "\033]0;$BASH_COMMAND\007"' DEBUG
fi
unset title_part chroot_part host_part directory_part git_part prompt_part
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment