From 1be7bbbfbe2d74ad94c7f29e5f6078e4bc2e74bc Mon Sep 17 00:00:00 2001 From: UnrealQuester Date: Tue, 22 Apr 2014 14:01:28 +0200 Subject: [PATCH] Fix dirhistory when the directory contains spaces pwd output is not escaped, so when changing to a directory like "space dir", only "space" gets saved in the history. This fix wraps `pwd` in double quotes to mitigate that. --- plugins/dirhistory/dirhistory.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 504d7ec14..c0b9ada32 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -50,7 +50,7 @@ function push_future() { # Called by zsh when directory changes function chpwd() { - push_past `pwd` + push_past "`pwd`" # If DIRHISTORY_CD is not set... if [[ -z "${DIRHISTORY_CD+x}" ]]; then # ... clear future.