mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
__fish_cursor_xterm: Ignore unknown cursor settings
This prevents leaking the escape sequence by printing nonsense, and it also allows disabling cursor setting by just setting the variable to e.g. empty. And if we ever added any shapes, it would allow them to be used on new fish and ignored on old Fixes #9698
This commit is contained in:
@@ -8,6 +8,9 @@ function __fish_cursor_xterm -d 'Set cursor (xterm)'
|
||||
set shape 4
|
||||
case line
|
||||
set shape 6
|
||||
case '*'
|
||||
# Unknown shape
|
||||
return
|
||||
end
|
||||
if contains blink $argv
|
||||
set shape (math $shape - 1)
|
||||
|
||||
Reference in New Issue
Block a user