diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-01 04:04:19 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2020-10-01 04:04:19 +0200 |
commit | 063938ff601c5fb5221b5ea3750f2cd6e60b77c2 (patch) | |
tree | f1cf2383f6dfcc930bbdd2686d064a3e221e35cd /README.adoc | |
parent | 93172797e1f36c7447e136f11d09c46d6e77d2ef (diff) | |
download | sdn-063938ff601c5fb5221b5ea3750f2cd6e60b77c2.tar.gz sdn-063938ff601c5fb5221b5ea3750f2cd6e60b77c2.tar.xz sdn-063938ff601c5fb5221b5ea3750f2cd6e60b77c2.zip |
README.adoc: add configuration for fish
Diffstat (limited to 'README.adoc')
-rw-r--r-- | README.adoc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/README.adoc b/README.adoc index 5ca0e5f..9f7be70 100644 --- a/README.adoc +++ b/README.adoc @@ -47,7 +47,7 @@ into the PATH of any machine you want to have 'sdn' on. 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 () { @@ -64,6 +64,24 @@ 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 + 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 ---- Here we can't reset the prompt from within a `bind -x` handler but there is |