navi/navi.plugin.fish

22 lines
436 B
Fish
Raw Normal View History

2019-10-11 17:33:16 +00:00
function navi-widget -d 'Call navi'
set -q NAVI_USE_FZF_ALL_INPUTS; or set -l NAVI_USE_FZF_ALL_INPUTS "true"
begin
navi --print | while read -l r; set result $result $r; end
if [ -n "$result" ]
echo $result
# Remove last token from commandline.
commandline -t ""
end
end
# commandline -f repaint
end
bind \cg navi-widget
if bind -M insert > /dev/null 2>&1
2019-10-11 17:40:42 +00:00
bind -M insert \cg navi-widget
2019-10-11 17:33:16 +00:00
end