Skip to content

Instantly share code, notes, and snippets.

@stenyak
Created September 22, 2014 10:24
Show Gist options
  • Save stenyak/03ed4425fbfa39a28fe7 to your computer and use it in GitHub Desktop.
Save stenyak/03ed4425fbfa39a28fe7 to your computer and use it in GitHub Desktop.
function updatePS1()
{
#...
local RESET="\[\033[00m\]"
local hosttext="\[$(colorize.sh $hostname)\]$(echo $hostname)$RESET"
export PS1="foobarbaz@$hosttext :"
#...
}
PROMPT_COMMAND=updatePS1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment