Commit a8bf610e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(insert-directory): Use -- as arg

so that a file name or pattern is never taken as an option.
parent 63ba033e
......@@ -2726,7 +2726,7 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
(if (stringp switches)
switches
(mapconcat 'identity switches " "))
" "
" -- "
pattern)))
;; SunOS 4.1.3, SVr4 and others need the "." to list the
;; directory if FILE is a symbolic link.
......@@ -2745,6 +2745,8 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
switches (substring switches (match-end 0))))
(setq list (nreverse (cons switches list))))))
(append list
;; Avoid lossage if FILE starts with `-'.
'("--")
(list
(if full-directory-p
(concat (file-name-as-directory file) ".")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment