Skip to content

Instantly share code, notes, and snippets.

@zironycho
Last active January 4, 2018 12:18
Show Gist options
  • Save zironycho/df01fe9438ab7058e5ea8cb496c4da65 to your computer and use it in GitHub Desktop.
Save zironycho/df01fe9438ab7058e5ea8cb496c4da65 to your computer and use it in GitHub Desktop.
ps1
### remote
pse="\[\033[m\]"
ps_w="\[\033[33;1m\]\w$pse"
ps_t="\[\033[35m\]\t$pse"
ps_h="\[\033[32m\][\h]$pse"
ps_u="\[\033[36m\]\u$pse"
if [ "`whoami`" = "root" ]; then
ps_p="# $pse"
else
ps_p="$ $pse"
fi
export PS1="$ps_t $ps_h $ps_w \n$ps_u$ps_p"
### osx to get hostname
ps_h="\[\033[32m\][$(scutil --get ComputerName)]$pse"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment