[zsh] Record cd execution in history (#2193)

This commit is contained in:
octaltree 2020-10-02 22:14:09 +09:00 committed by GitHub
parent 736344e151
commit 82c4af2902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,8 +87,9 @@ fzf-cd-widget() {
zle redisplay zle redisplay
return 0 return 0
fi fi
cd "$dir" BUFFER="cd ${(q)dir}"
unset dir # ensure this doesn't end up appearing in prompt expansion unset dir # ensure this doesn't end up appearing in prompt expansion
zle accept-line
local ret=$? local ret=$?
zle fzf-redraw-prompt zle fzf-redraw-prompt
return $ret return $ret