From 063938ff601c5fb5221b5ea3750f2cd6e60b77c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Thu, 1 Oct 2020 04:04:19 +0200 Subject: README.adoc: add configuration for fish --- README.adoc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'README.adoc') 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 -- cgit v1.2.3