common/home/fish/functions/fish_mode_prompt.fish

25 lines
594 B
Fish
Raw Normal View History

2021-01-02 23:30:57 -08:00
#!/bin/fish
function fish_mode_prompt --description 'Displays the current vi mode'
# Do nothing if not in vi mode
if test "$fish_key_bindings" = "fish_vi_key_bindings"
switch $fish_bind_mode
case default
set_color --bold red
echo -n 🅽
case insert
set_color --bold green
echo -n 🅸
case replace_one
set_color --bold green
echo -n 🆁
case visual
set_color --bold brblue
echo -n 🆅
end
set_color normal
echo -n ' '
end
end