mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* usr/share/byobu/profiles/bashrc: LP: #1259621
- add a visual queue in the PS1 command prompt when running as the root user; prepend "!" in front of "root"
This commit is contained in:
parent
018c10c902
commit
c0b5bff828
2 changed files with 6 additions and 2 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -5,6 +5,9 @@ byobu (5.75) unreleased; urgency=medium
|
|||
* usr/lib/byobu/include/shutil, usr/lib/byobu/release: LP: #1278016
|
||||
- /etc/issue might be modified to display corporate banners or
|
||||
legal warnings; try to use /etc/os-release if available
|
||||
* usr/share/byobu/profiles/bashrc: LP: #1259621
|
||||
- add a visual queue in the PS1 command prompt when running as the
|
||||
root user; prepend "!" in front of "root"
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 16 Mar 2014 12:46:36 -0700
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ if [ -n "$TMUX" ] || [ "${TERMCAP#*screen}" != "${TERMCAP}" ]; then
|
|||
# Ensure that we're in bash, in a byobu environment
|
||||
if [ -n "$BYOBU_BACKEND" ] && [ -n "$BASH" ]; then
|
||||
byobu_prompt_status() { local e=$?; [ $e != 0 ] && echo -e "$e "; }
|
||||
byobu_root() { [ "$USER" = "root" ] && printf "%s" "!"; }
|
||||
case "$BYOBU_DISTRO" in
|
||||
"Ubuntu")
|
||||
# Use Ubuntu colors (grey / aubergine / orange)
|
||||
|
@ -33,11 +34,11 @@ if [ -n "$TMUX" ] || [ "${TERMCAP#*screen}" != "${TERMCAP}" ]; then
|
|||
case "$BYOBU_CHARMAP" in
|
||||
"UTF-8")
|
||||
# MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET (U+27EB, Pe): ⟫
|
||||
PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;202m\]\$(byobu_prompt_status)\[\e[38;5;245m\]\u\[\e[00m\]@\[\e[38;5;5m\]\h\[\e[00m\]:\[\e[38;5;172m\]\w\[\e[00m\]⟫ "
|
||||
PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;202m\]\$(byobu_prompt_status)\[\e[38;5;245m\]\$(byobu_root)\u\[\e[00m\]@\[\e[38;5;5m\]\h\[\e[00m\]:\[\e[38;5;172m\]\w\[\e[00m\]⟫ "
|
||||
;;
|
||||
*)
|
||||
# Simple ASCII greater-than sign
|
||||
PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;202m\]\$(byobu_prompt_status)\[\e[38;5;245m\]\u\[\e[00m\]@\[\e[38;5;5m\]\h\[\e[00m\]:\[\e[38;5;172m\]\w\[\e[00m\]> "
|
||||
PS1="${debian_chroot:+($debian_chroot)}\[\e[38;5;202m\]\$(byobu_prompt_status)\[\e[38;5;245m\]\$(byobu_root)\u\[\e[00m\]@\[\e[38;5;5m\]\h\[\e[00m\]:\[\e[38;5;172m\]\w\[\e[00m\]> "
|
||||
;;
|
||||
esac
|
||||
export GREP_COLORS="ms=01;38;5;202:mc=01;31:sl=:cx=:fn=01;38;5;132:ln=32:bn=32:se=00;38;5;242"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue