From: Sergey Matveev Date: Wed, 2 Jun 2021 10:54:54 +0000 (+0300) Subject: Add cd to history after cf X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=9cb9aaa828a738a939ec0d5136604141f334b2b1 Add cd to history after cf --- 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 } } # }}}