Last active
April 27, 2020 07:44
-
-
Save dagvany/f390a30929914fe221eca48fa97fd7ac to your computer and use it in GitHub Desktop.
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
# my favorit prompt look | |
# [time] [user] [computer] [pwd] [git branch] | |
if [ "$color_prompt" = yes ]; then | |
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; } | |
HOST=' \033[02;36m\h'; | |
TIME='\033[01;31m\t \e[0;37m' | |
LOCATION=' \033[01;32m`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`' | |
BRANCH=' \033[00;33m$(git_branch)\[\033[00m\n\$ ' | |
PS1=$TIME$USER$HOST$LOCATION$BRANCH | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
unset color_prompt force_color_prompt | |
# readable windows folder color | |
LS_COLORS=$LS_COLORS:'ow=01;36;40' ; export LS_COLORS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment