Add instructions for fish widget

This commit is contained in:
Denis Isidoro 2019-10-14 13:44:52 -03:00
parent 8b99c86e5a
commit cf090d546c
2 changed files with 14 additions and 15 deletions

View File

@ -138,6 +138,9 @@ source "$(navi widget bash)"
# zsh
source "$(navi widget zsh)"
# fish
source (navi widget fish)
```
By default, `Ctrl+G` is assigned to launching **navi**. If you want to change the keybinding, replace the argument of `bind` or `bindkey` in [the widget file](https://github.com/denisidoro/navi/search?q=filename%3Anavi.plugin.*&unscoped_q=filename%3Anavi.plugin.*).

View File

@ -1,17 +1,13 @@
function navi_key_bindings
function navi-widget -d "Show cheat sheet"
set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%
begin
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m"
stty sane
env NAVI_USE_FZF_ALL_INPUTS=true navi --print query (commandline) | perl -pe 'chomp if eof' | read -lz result
and commandline -- $result
end
commandline -f repaint
end
bind \cg navi-widget
if bind -M insert > /dev/null 2>&1
bind -M insert \cg navi-widget
function navi-widget -d "Show cheat sheets"
begin
stty sane
env NAVI_USE_FZF_ALL_INPUTS=true navi --print query (commandline) | perl -pe 'chomp if eof' | read -lz result
and commandline -- $result
end
commandline -f repaint
end
bind \cg navi-widget
if bind -M insert > /dev/null 2>&1
bind -M insert \cg navi-widget
end