irongit

Hygo AI custom shell.

the crackhead ai made some weird stuff work

huncholanehuncholaneauthored
parent 29f2a43commit d3a756715b76d91938de489dee1621bd531e38f3Browse files

1 file changed, +3 -6

+3-6setup.sh
@@ -9,11 +9,8 @@ fi
99 cd $CURRENT_DIR
1010
1111 # Function to get the current Git branch
12-git_branch_str() {
13- git_branch=$(git branch 2>/dev/null | grep '*' | sed 's/* //')
14- if [ -n "$git_branch" ]; then
15- echo -e "($git_branch)"
16- fi
12+get_git_branch() {
13+ git branch 2>/dev/null | grep '*' | sed 's/* //'
1714 }
1815
1916 # Set up zsh prompt
@@ -23,5 +20,5 @@ fi
2320
2421 # Set up bash prompt
2522 if [ -n "$BASH_VERSION" ]; then
26- PS1="\[\e[38;5;214m\]\u@\h \w $(git_branch_str)\n\$\[\e[0m\] "
23+ PS1='\[\e[38;5;214m\]\u@\h \w$(git_branch=$(get_git_branch); if [ -n "$git_branch" ]; then echo " \[\e[37m\]($git_branch\[\e[0m\])"; fi)\n\$\[\e[0m\] '
2724 fi