Mercurial > emacs
comparison lisp/ido.el @ 73260:4dce8f520712
(ido-wide-find-dirs-or-files): Use shell-quote-argument.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 06 Oct 2006 12:49:12 +0000 |
parents | 7e2d2b8518f4 |
children | acb35bee2828 |
comparison
equal
deleted
inserted
replaced
73259:2bba5aa7a1a6 | 73260:4dce8f520712 |
---|---|
3134 (defun ido-wide-find-dirs-or-files (dir file &optional prefix finddir) | 3134 (defun ido-wide-find-dirs-or-files (dir file &optional prefix finddir) |
3135 ;; As ido-run-find-command, but returns a list of cons pairs ("file" . "dir") | 3135 ;; As ido-run-find-command, but returns a list of cons pairs ("file" . "dir") |
3136 (let ((filenames | 3136 (let ((filenames |
3137 (split-string | 3137 (split-string |
3138 (shell-command-to-string | 3138 (shell-command-to-string |
3139 (concat "find " dir " -name \"" (if prefix "" "*") file "*\" -type " (if finddir "d" "f") " -print")))) | 3139 (concat "find " |
3140 (shell-quote-argument dir) | |
3141 " -name " | |
3142 (shell-quote-argument | |
3143 (concat (if prefix "" "*") file "*")) | |
3144 " -type " (if finddir "d" "f") " -print")))) | |
3140 filename d f | 3145 filename d f |
3141 res) | 3146 res) |
3142 (while filenames | 3147 (while filenames |
3143 (setq filename (car filenames) | 3148 (setq filename (car filenames) |
3144 filenames (cdr filenames)) | 3149 filenames (cdr filenames)) |