From 487417574dd70d2dea4c7abdf7baed42107915e9 Mon Sep 17 00:00:00 2001 From: DevAtDawn <86164137+DevAtDawn@users.noreply.github.com> Date: Thu, 16 Dec 2021 04:24:21 -0700 Subject: [PATCH] Notes Notes --- shell/navi.plugin.fish | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shell/navi.plugin.fish b/shell/navi.plugin.fish index 1e9ebd4..4980241 100644 --- a/shell/navi.plugin.fish +++ b/shell/navi.plugin.fish @@ -16,6 +16,16 @@ function navi-widget -d "Show cheat sheets" commandline -f repaint end +function smart_replace + #cli_buffer = commandline - + # split at last | left/right str + # set $user_input + # if query = answer : call Navi-widget + # else smart_replace : + # set output (navi --print --best-match --query $user_input) + # replace userinput string in clibuff or left string += output + # commandline append repaint + bind \cg navi-widget if bind -M insert > /dev/null 2>&1 bind -M insert \cg navi-widget