summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authoroctaltree <octaltree@users.noreply.github.com>2020-10-02 22:14:09 +0900
committerGitHub <noreply@github.com>2020-10-02 22:14:09 +0900
commit82c4af29028d6035832cf3ab58bafb4fd9605f60 (patch)
tree4fe7c18ebbd97ea1b548308c3e4d3a161ec26be4 /shell
parent736344e151fd8937353ef8da5379c1082e441468 (diff)
[zsh] Record cd execution in history (#2193)
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 559690a7..2433d988 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