From 75a5eca3b969230c1faa2ea6afa7824203a92caf Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Mon, 5 May 2025 23:54:03 +0300 Subject: [PATCH] updated prompt-themes to add a command to parse git branch and display it --- bin/prompt-themes.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/prompt-themes.sh b/bin/prompt-themes.sh index 3a54d91..78ade68 100755 --- a/bin/prompt-themes.sh +++ b/bin/prompt-themes.sh @@ -1,5 +1,9 @@ #!/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="$HOME/.config/prompt-themes" config_file="$config_dir/config.yaml" @@ -75,3 +79,5 @@ else export PS1='\[\033[01;34m\]\u@\h \[\033[01;32m\]\w\[\033[00m\] \$ ' fi + +