aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.adoc20
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