mirror of
https://github.com/denisidoro/navi
synced 2024-11-21 19:13:07 +00:00
Run fish_indent
This commit is contained in:
parent
53c1ddf42f
commit
ad49f43157
1 changed files with 20 additions and 20 deletions
|
@ -1,29 +1,29 @@
|
|||
function _navi_smart_replace
|
||||
set -l current_process (commandline -p | string trim)
|
||||
set -l current_process (commandline -p | string trim)
|
||||
|
||||
if test -z $current_process
|
||||
commandline -i (navi --print)
|
||||
else
|
||||
set -l best_match (navi --print --best-match --query $current_process)
|
||||
|
||||
if not test $best_match > /dev/null
|
||||
return
|
||||
end
|
||||
|
||||
if test $best_match = ""
|
||||
commandline -p (navi --print --query $current_process)
|
||||
else if test $current_process != $best_match
|
||||
commandline -p $best_match
|
||||
if test -z $current_process
|
||||
commandline -i (navi --print)
|
||||
else
|
||||
commandline -p (navi --print --query $current_process)
|
||||
end
|
||||
end
|
||||
set -l best_match (navi --print --best-match --query $current_process)
|
||||
|
||||
commandline -f repaint
|
||||
if not test $best_match >/dev/null
|
||||
return
|
||||
end
|
||||
|
||||
if test $best_match = ""
|
||||
commandline -p (navi --print --query $current_process)
|
||||
else if test $current_process != $best_match
|
||||
commandline -p $best_match
|
||||
else
|
||||
commandline -p (navi --print --query $current_process)
|
||||
end
|
||||
end
|
||||
|
||||
commandline -f repaint
|
||||
end
|
||||
|
||||
if test $fish_key_bindings = fish_default_key_bindings
|
||||
bind \cg _navi_smart_replace
|
||||
bind \cg _navi_smart_replace
|
||||
else
|
||||
bind -M insert \cg _navi_smart_replace
|
||||
bind -M insert \cg _navi_smart_replace
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue