Created
February 7, 2023 13:14
-
-
Save lostvikx/f71b8c7d27baeda675058e152c7d8cbe to your computer and use it in GitHub Desktop.
A custom minimal bash prompt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# \W: Current dir | |
# \w: Path from home dir | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[\033[00m\]\[\033[01;34m\][\w]\[\033[00m\] \$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\W \$ ' | |
fi | |
unset color_prompt force_color_prompt | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u: \w\a\]$PS1" | |
;; | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment