zshrc: inplaceMkDirs(): handle espaces and quotes better
authorBernhard Tittelbach <bernhard@tittelbach.org>
Wed, 9 Nov 2011 11:19:34 +0000 (12:19 +0100)
committerBernhard Tittelbach <bernhard@tittelbach.org>
Wed, 9 Nov 2011 11:19:34 +0000 (12:19 +0100)
etc/zsh/zshrc

index 509f6f2..6add6f2 100644 (file)
@@ -2810,7 +2810,7 @@ inplaceMkDirs() {
         bufwords=(${(z)LBUFFER})
         iword=${#bufwords}
         bufwords=(${(z)BUFFER})
-        PATHTOMKDIR="$bufwords[iword]"
+        PATHTOMKDIR="${(Q)bufwords[iword]}"
     fi
     [[ -z "${PATHTOMKDIR}" ]] && return 1
     if [[ -e "${PATHTOMKDIR}" ]]; then