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,8 +1,5 @@
function navi_key_bindings
function navi-widget -d "Show cheat sheet"
set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%
function navi-widget -d "Show cheat sheets"
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
@ -14,4 +11,3 @@ function navi_key_bindings
if bind -M insert > /dev/null 2>&1
bind -M insert \cg navi-widget
end
end