From 9cb9aaa828a738a939ec0d5136604141f334b2b1 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 2 Jun 2021 13:54:54 +0300 Subject: [PATCH] Add cd to history after cf --- zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 829cd01..25972b6 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -215,7 +215,7 @@ export FZF_DEFAULT_OPTS="--color=16 --info=inline" cf() { local dir=$(find -L ${1:-.} -mindepth 1 -path "*/\.git" -prune -o -type d -print | fzf --height 40% --reverse --preview="tree -CN {}") - [[ -z $dir ]] || cd $dir + [[ -z $dir ]] || { print -s cd $dir ; cd $dir } } # }}} -- 2.44.0