Created
July 4, 2020 11:45
-
-
Save lukewendling/82d72332eac947d6397702927e35fafb to your computer and use it in GitHub Desktop.
short colorful 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
# Prompt format: username:os:currentdir> | |
# luke:debian10:myapps> | |
CURR_DIR=$(basename "$PWD") | |
ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"') | |
VERSION=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"') | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:$ID$VERSION:\[\033[01;34m\]${CURR_DIR}\[\033[00m\]> ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment