mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 08:55:52 +08:00
d73ff39393
Fixes #3593
14 lines
439 B
Fish
14 lines
439 B
Fish
# Set the cursor using the '\e]1337;' sequence recognized by iTerm2 on macOS and possibly other
|
|
# terminals.
|
|
function __fish_cursor_1337 -d 'Set cursor using OSC command 1337'
|
|
set -l shape $argv[1]
|
|
switch "$shape"
|
|
case block
|
|
echo -en '\e]1337;CursorShape=0\x7'
|
|
case underscore
|
|
echo -en '\e]1337;CursorShape=2\x7'
|
|
case line
|
|
echo -en '\e]1337;CursorShape=1\x7'
|
|
end
|
|
end
|