Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########################################
- # set up prompt
- if [ "$UID" = "0" ]
- then
- pc='1;37;41' # root: bright white on red
- elif [ -n "${SSH_CLIENT:-}" ]
- then
- pc='1;33;44' # non-local: is yellow on blue
- else
- pc='1;30;42' # local: bright black on green
- fi
- PROMPT_TOP_STAY=false
- PROMPT_TOP_ONLY=false
- if $PROMPT_TOP_STAY
- then
- p1='\[\e[s\e[H\e[0;'
- p2='m\e[K(\u@\h) \# \w\e[0m\e[2r\e[u\]\$ '
- PS1="$p1$pc$p2"
- unset p1 p2 pc
- elif $PROMPT_TOP_ONLY
- then
- p1='\[\e[s\e[H\e[0;'
- p2='m\e[K(\u@\h) \# \w\e[0m\e[u\]\$ '
- PS1="$p1$pc$p2"
- unset p1 p2 pc
- else
- p1='\[\e[0;'
- p2='m\](\u@\h) \# \w \$\[\e[0m\] '
- PS1="$p1$pc$p2"
- unset p1 p2 pc
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement