shell: bash: git branch and fix delete key

This commit is contained in:
lupan committed 2026-10-03 09:43:11 +02:00
1 parent 22aac76dc7
commit 0dd8b02a28
1 file changed
+10
+10
View File
@@ -10,6 +10,12 @@ PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ ' PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ '
if [ -e /usr/share/git/git-prompt.sh ]; then
source /usr/share/git/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=1
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m$(__git_ps1) \$ '
fi
HISTTIMEFORMAT='%F %R ' HISTTIMEFORMAT='%F %R '
function before_command() { echo -ne '\e[2 q'; } function before_command() { echo -ne '\e[2 q'; }
@@ -18,6 +24,10 @@ trap before_command DEBUG
# Aliases. # Aliases.
for f in ~/.config/shellconfig/*.sh; do source "$f"; done for f in ~/.config/shellconfig/*.sh; do source "$f"; done
if [[ "$TERM" = st-256color ]]; then
tput smkx
fi
if [[ -f /usr/share/bash-completion/bash_completion ]]; then if [[ -f /usr/share/bash-completion/bash_completion ]]; then
. /usr/share/bash-completion/bash_completion . /usr/share/bash-completion/bash_completion
fi fi