From 44d8dfc01df4df4bffe0902bd3059d39b622b69d Mon Sep 17 00:00:00 2001 From: DevAtDawn <86164137+DevAtDawn@users.noreply.github.com> Date: Thu, 16 Dec 2021 05:21:07 -0700 Subject: [PATCH] Update navi.plugin.fish --- shell/navi.plugin.fish | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/shell/navi.plugin.fish b/shell/navi.plugin.fish index 4980241..81fa875 100644 --- a/shell/navi.plugin.fish +++ b/shell/navi.plugin.fish @@ -16,7 +16,21 @@ function navi-widget -d "Show cheat sheets" commandline -f repaint end -function smart_replace +function smart_replace + set -l current_buffer (commandline -b) + set -l current_process (commandline -p) + set -l best_match (navi --print --best-match --query $current_process) + echo $best_match $current_process + + if [ $current_process != $best_match ] + echo "true" + else + echo "false" + navi-widget + end + + + #cli_buffer = commandline - # split at last | left/right str # set $user_input