summaryrefslogtreecommitdiff
path: root/src/shell-integration/bash/ghostty.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell-integration/bash/ghostty.bash')
-rw-r--r--src/shell-integration/bash/ghostty.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash
index 21a6965ca..df4c7f9a7 100644
--- a/src/shell-integration/bash/ghostty.bash
+++ b/src/shell-integration/bash/ghostty.bash
@@ -122,8 +122,8 @@ function __ghostty_precmd() {
# Cursor
if [[ "$GHOSTTY_SHELL_FEATURES" == *"cursor"* ]]; then
- PS1=$PS1'\[\e[5 q\]' # blinking bar for input
- builtin printf "\e[0 q" # reset to default cursor
+ [[ "$PS1" != *'\[\e[5 q\]'* ]] && PS1=$PS1'\[\e[5 q\]' # input
+ [[ "$PS0" != *'\[\e[0 q\]'* ]] && PS0=$PS0'\[\e[0 q\]' # reset
fi
# Title (working directory)