shell-integration: implement "no-cursor" option

Implement a "no-cursor" option for shell integration. This option acts
like "detect" but doesn't set the cursor shape.
This commit is contained in:
Tim Culverhouse
2023-11-07 16:24:58 -06:00
parent 36dd5ef4ee
commit 4fac674016
5 changed files with 44 additions and 23 deletions

View File

@@ -41,8 +41,10 @@ function __ghostty_precmd() {
PS2=$PS2'\[\e]133;B\a\]'
# Cursor
if test "$GHOSTTY_SHELL_INTEGRATION_NO_CURSOR" != "1"; then
PS1=$PS1'\[\e[5 q\]'
PS0=$PS0'\[\e[0 q\]'
fi
# Command
PS0=$PS0'$(__ghostty_get_current_command)'