zshrc: alias to rm pesky OSX metadata files and directories
[grml-etc-core.git] / etc / zsh / zshrc
index 84578f9..2058a2e 100644 (file)
@@ -2581,6 +2581,9 @@ alias fblinks='links2 -driver fb'
 alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
 alias insecscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
 
+#a2# clean a drive or directory tree of those pesky OSX metadata-files
+alias demac='rm -vfRi  **/.(_.|)DS_Store(.) **/._.Trashes(.) **/.Trashes(/) **/.fseventsd(/)'
+
 # simple webserver
 check_com -c python && alias http="python -m SimpleHTTPServer"
 
@@ -2810,7 +2813,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
@@ -3282,7 +3285,6 @@ readme() {
     emulate -L zsh
     setopt extendedglob
     local files
-    files=(./(#i)*(read*me|lue*m(in|)ut)*(ND))
     files=(./(#i)*(read*me|lue*m(in|)ut|lies*mich)*(NDr^/=p%))
     if (($#files)) ; then
         $PAGER $files