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.
This commit is contained in:
UnrealQuester 2014-04-22 14:01:28 +02:00
commit 1be7bbbfbe

View file

@ -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.