updated prompt-themes to add a command to parse git branch and display it
This commit is contained in:
parent
aac6ed7535
commit
75a5eca3b9
1 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
parse_git_branch() {
|
||||||
|
git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's/^/ /;s/$//'
|
||||||
|
}
|
||||||
|
|
||||||
#config_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
#config_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
config_dir="$HOME/.config/prompt-themes"
|
config_dir="$HOME/.config/prompt-themes"
|
||||||
config_file="$config_dir/config.yaml"
|
config_file="$config_dir/config.yaml"
|
||||||
|
|
@ -75,3 +79,5 @@ else
|
||||||
export PS1='\[\033[01;34m\]\u@\h \[\033[01;32m\]\w\[\033[00m\] \$ '
|
export PS1='\[\033[01;34m\]\u@\h \[\033[01;32m\]\w\[\033[00m\] \$ '
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue