From 1ed945fa81459d9c1d35acdb581ecf889e08eeb5 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 11 Oct 2017 02:05:50 +0900 Subject: [PATCH] Revert 426e5a3^...426e5a3 on Examples --- Examples.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Examples.md b/Examples.md index 234b433..051932f 100644 --- a/Examples.md +++ b/Examples.md @@ -663,12 +663,11 @@ Fish like interactive tab completion for cd in zsh. like normal z when used with arguments but displays an fzf prompt when used without. ```sh -unalias ${_Z_CMD:-z} 2>/dev/null -function ${_Z_CMD:-z} { - [[ $# -gt 0 ]] && _z $* && return - cd "$(_z -l 2>&1 | sed 's/^[^ ]* *//' | fzf --height 40% --reverse --inline-info +s --tac --query "${*##-* }")" +unalias z 2> /dev/null +z() { + [ $# -gt 0 ] && _z "$*" && return + cd "$(_z -l 2>&1 | fzf --height 40% --reverse --inline-info +s --tac --query "$*" | sed 's/^[0-9,.]* *//')" } - ``` Here is another version that also supports relaunching z with the arguments