fish: add set_cursor function
This commit is contained in:
parent
643952f7c4
commit
04d0c98953
1
fish/completions/set_cursor.fish
Normal file
1
fish/completions/set_cursor.fish
Normal file
@ -0,0 +1 @@
|
||||
complete -c set_cursor -x -a 'bar block underline bar-blink block-blink underline-blink'
|
19
fish/functions/set_cursor.fish
Normal file
19
fish/functions/set_cursor.fish
Normal file
@ -0,0 +1,19 @@
|
||||
function set_cursor --argument cursor_type
|
||||
switch "$cursor_type"
|
||||
case block-blink
|
||||
echo -en "\x1b[1 q"
|
||||
case block
|
||||
echo -en "\x1b[2 q"
|
||||
case underline-blink
|
||||
echo -en "\x1b[3 q"
|
||||
case underline
|
||||
echo -en "\x1b[4 q"
|
||||
case bar-blink
|
||||
echo -en "\x1b[5 q"
|
||||
case bar
|
||||
echo -en "\x1b[6 q"
|
||||
case '*'
|
||||
echo "Usage: set_cursor {block|underline|bar}[-blink]"
|
||||
echo "No cursor matching: '$cursor_type'"
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user