diff options
author | Maxim Gonchar <gmaxfl@gmail.com> | 2014-01-20 16:47:13 +0400 |
---|---|---|
committer | Maxim Gonchar <gmaxfl@gmail.com> | 2014-01-20 16:47:13 +0400 |
commit | 35919000709c00274f2fbb56db2f2924585edd05 (patch) | |
tree | 91ca0debe63927dce45bc7a9628da40df3c1a081 /share/functions/__fish_cursor_xterm.fish | |
parent | 44c6fa68cfae06337801da42e273eeee5ef90a67 (diff) |
More clear way of setting cursor shape
Diffstat (limited to 'share/functions/__fish_cursor_xterm.fish')
-rw-r--r-- | share/functions/__fish_cursor_xterm.fish | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/share/functions/__fish_cursor_xterm.fish b/share/functions/__fish_cursor_xterm.fish new file mode 100644 index 00000000..1a0909e8 --- /dev/null +++ b/share/functions/__fish_cursor_xterm.fish @@ -0,0 +1,16 @@ +function __fish_cursor_xterm -d 'Set cursor (xterm)' + set -l shape $argv[1] + + 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" +end |