fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
495083249
master
1function fish_vi_cursor -d'Set cursor shape for different vi modes' 2set -q fish_cursor_unknown 3or set -g fish_cursor_unknown block 4 5function __fish_vi_cursor --argument-names varname 6if not status is-interactive;and not status is-interactive-read 7return 8end 9if not set -q$varname 10switch $varname 11case fish_cursor_insert 12__fish_cursor_xterm line 13case fish_cursor_replace_one fish_cursor_replace 14__fish_cursor_xterm underscore 15case '*' 16__fish_cursor_xterm $fish_cursor_unknown 17end 18return 19end 20__fish_cursor_xterm $$varname 21end 22 23function fish_vi_cursor_handle --on-variable fish_bind_mode --on-event fish_postexec --on-event fish_focus_in --on-event fish_read 24__fish_vi_cursor fish_cursor_$fish_bind_mode 25end 26 27function fish_vi_cursor_handle_preexec --on-event fish_preexec --on-event fish_exit 28set -l varname fish_cursor_external 29if not set -q$varname 30set varname fish_cursor_default 31end 32__fish_vi_cursor $varname 33end 34end