updated prompt-themes to add a command to parse git branch and display it

This commit is contained in:
ronny abraham 2025-05-05 23:54:03 +03:00
parent aac6ed7535
commit 75a5eca3b9

View file

@ -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