mirror of
https://github.com/denisidoro/navi.git
synced 2024-09-19 14:27:17 +03:00
22 lines
436 B
Fish
22 lines
436 B
Fish
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
|
|
bind -M insert \cg navi-widget
|
|
end
|