fish-shell/share/functions/__fish_cursor_xterm.fish

17 lines
298 B
Fish
Raw Normal View History

2014-01-20 20:47:13 +08:00
function __fish_cursor_xterm -d 'Set cursor (xterm)'
set -l shape $argv[1]
2014-01-20 20:47:13 +08:00
switch "$shape"
case block
set shape 2
case underscore
set shape 4
case line
set shape 6
end
if contains blink $argv
set shape (expr $shape - 1)
end
echo -en "\e[$shape q"
2014-01-20 20:47:13 +08:00
end