the error handling here made me cry (making esc/ctrl+c/ctrl+g exiting work without issues)
This commit is contained in:
DevAtDawn 2021-12-16 11:45:57 -07:00 committed by GitHub
parent 5e3215466d
commit e7dea3ed68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,3 @@
# navi widget fish | source
function __call_navi
navi --print
end
@ -27,21 +24,22 @@ function smart_replace
commandline -f repaint
else
set -l best_match (navi --print --best-match --query $current_process)
# if [ $navi_last_cmd = $current_process ]
if not [ $best_match > /dev/null ];
commandline -p $current_process
commandline -f repaint
return
end
if [ $best_match = "" ]
# set navi_last_cmd (commandline -p)
# commandline -p $current_process
commandline -p (navi --print --query $current_process)
commandline -f repaint
# else
else if [ $current_process != $best_match ]
commandline -p $best_match
commandline -f repaint
else if [ $current_process = $best_match ]
commandline -p (navi --print --query $current_process)
commandline -f repaint
# else
# commandline -p $current_process
end
end
end