オリジナルのfind-name-dired
ではワイルドカードを複数指定することはできない.
M-x find-dired
のみで実現可能ではあるのだが,タイプ量がかさむ.
そこでfind-dired
のラッパーとして以下を書いてみた.
(defun my-find-name-dired (dir patterns) (interactive "DFind-name (directory): \nsFind-name (filename wildcards): ") (let ((filename-wildcards (concat (shell-quote-argument "(") " " find-name-arg " " (mapconcat #'shell-quote-argument (split-string patterns) (concat " -o " find-name-arg " ")) " " (shell-quote-argument ")")))) (find-dired dir filename-wildcards)))
ワイルドカードはスペースで区切って入力する.
例
M-x my-find-name-dired
(ディレクトリ入力)RET
.cSPC
.cppRET