README.adoc: add configuration for fish

This commit is contained in:
Přemysl Eric Janouch 2020-10-01 04:04:19 +02:00
parent 93172797e1
commit 063938ff60
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 19 additions and 1 deletions

View File

@ -47,7 +47,7 @@ into the PATH of any machine you want to have 'sdn' on.
zsh zsh
--- ---
To start using this navigator, put the following in your .zshrc: To start using this navigator, put the following in your '.zshrc':
.... ....
sdn-navigate () { sdn-navigate () {
@ -64,6 +64,24 @@ zle -N sdn-navigate
bindkey '\eo' 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
while eval (sdn | string replace -ar '^(.*?)=' 'set --$1 ')
test -z "$cd" || cd "$cd"
test -z "$insert" || commandline --insert "$insert "
test -z "$helper" && break
eval $helper || break
end
commandline --function repaint
end
bind \eo sdn-navigate
....
bash bash
---- ----
Here we can't reset the prompt from within a `bind -x` handler but there is Here we can't reset the prompt from within a `bind -x` handler but there is