]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Add cd to history after cf
authorSergey Matveev <stargrave@stargrave.org>
Wed, 2 Jun 2021 10:54:54 +0000 (13:54 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 2 Jun 2021 10:54:54 +0000 (13:54 +0300)
zsh/.zshrc

index 829cd01ff54f5ec909a70c470db3fbb75394d0d3..25972b6750f92af4759a710ff10e67eaa09d4767 100644 (file)
@@ -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 }
 }
 # }}}