zshrc: inplaceMkDirs(): handle espaces and quotes better
[grml-etc-core.git] / 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