more minimal prompt
This commit is contained in:
parent
02839ab30b
commit
01d891272e
1 changed files with 7 additions and 6 deletions
13
shell/bashrc
13
shell/bashrc
|
@ -3,14 +3,15 @@
|
|||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# Prompt
|
||||
# git branch
|
||||
prompt_git_branch() {
|
||||
GIT_BRANCH="$(git branch 2>/dev/null | grep '*' | cut -d ' ' -f 2)"
|
||||
[ -n "$GIT_BRANCH" ] && printf " %s " "$GIT_BRANCH"
|
||||
GIT_BRANCH="$(git branch 2>/dev/null | sed '/\*/!d;s/^\*\s*//g;s/\s*$//g')"
|
||||
[ -n "$GIT_BRANCH" ] && printf "%s " "$GIT_BRANCH"
|
||||
}
|
||||
# Alt PS1 without background
|
||||
#PS1='\[\033[2m\]($?)\[\033[0m\]\[\033[1m\]\[\033[36m\] \u@\h \[\033[34m\]\w \[\033[35m\]$(prompt_git_branch)\[\033[0m\]\[\033[2m\][\!] \@\n\[\033[0m\]⯈ '
|
||||
PS1='\[\033[2m\]($?) \[\033[1m\]\[\033[46m\] \u@\h \[\033[44m\] \w \[\033[45m\]$(prompt_git_branch)\[\033[0m\] \[\033[2m\][\!] \@\n\[\033[0m\]⯈ '
|
||||
|
||||
PS1='\[\033[2m\]($?)\[\033[0m\]\[\033[1m\]\[\033[36m\] \u@\h \[\033[34m\]\w \[\033[35m\]$(prompt_git_branch)\[\033[0m\]\[\033[2m\][\!] \@\n\[\033[0m\]\[\033[2m\]$\[\033[0m\] '
|
||||
# Alt PS1 with background
|
||||
#PS1='\[\033[2m\]($?) \[\033[1m\]\[\033[46m\] \u@\h \[\033[44m\] \w \[\033[45m\]$(prompt_git_branch)\[\033[0m\] \[\033[2m\][\!] \@\n\[\033[0m\]⯈ '
|
||||
PROMPT_COMMAND="echo" # Line jump after every command
|
||||
|
||||
# General configs
|
||||
|
|
Loading…
Reference in a new issue