From a95fa2f96df72eba30e8348c8526677f27b906b1 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Tue, 20 Oct 2020 03:47:12 +0200 Subject: README.adoc: fish after bash Bash is a bad citizen but this order makes more sense. --- README.adoc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.adoc b/README.adoc index 780ff60..d51dc76 100644 --- a/README.adoc +++ b/README.adoc @@ -73,26 +73,6 @@ zle -N sdn-navigate bindkey '\eo' sdn-navigate ---- -fish -~~~~ -To start using this navigator, put the following in your 'config.fish': - ----- -function sdn-navigate - set --local IFS - set --local buffer (commandline) - set --local cursor (commandline --cursor) - while eval (sdn $buffer $cursor | string replace -ar '^(.*?)=' 'set --$1 ') - test -z "$cd" || cd "$cd" - test -z "$insert" || commandline --insert "$insert " - test -z "$helper" && break - /bin/sh -c "$helper" || break - end - commandline --function repaint -end -bind \eo sdn-navigate ----- - bash ~~~~ Here we can't make the shell update the prompt on directory changes since @@ -130,6 +110,26 @@ bind -x '"\201": sdn-restore' bind '"\eo":"\200\C-m\201"' ---- +fish +~~~~ +To start using this navigator, put the following in your 'config.fish': + +---- +function sdn-navigate + set --local IFS + set --local buffer (commandline) + set --local cursor (commandline --cursor) + while eval (sdn $buffer $cursor | string replace -ar '^(.*?)=' 'set --$1 ') + test -z "$cd" || cd "$cd" + test -z "$insert" || commandline --insert "$insert " + test -z "$helper" && break + /bin/sh -c "$helper" || break + end + commandline --function repaint +end +bind \eo sdn-navigate +---- + elvish ~~~~~~ To start using this navigator, put the following in your 'rc.elv': -- cgit v1.2.3-70-g09d2