From 82c4af29028d6035832cf3ab58bafb4fd9605f60 Mon Sep 17 00:00:00 2001 From: octaltree Date: Fri, 2 Oct 2020 22:14:09 +0900 Subject: [PATCH] [zsh] Record cd execution in history (#2193) --- shell/key-bindings.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index 559690a..2433d98 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -87,8 +87,9 @@ fzf-cd-widget() { zle redisplay return 0 fi - cd "$dir" + BUFFER="cd ${(q)dir}" unset dir # ensure this doesn't end up appearing in prompt expansion + zle accept-line local ret=$? zle fzf-redraw-prompt return $ret