emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using `call-process-shell-command' in `process-lines'


From: Lennart Borgman (gmail)
Subject: Re: Using `call-process-shell-command' in `process-lines'
Date: Mon, 26 Nov 2007 23:35:06 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Eli Zaretskii wrote:
Date: Tue, 27 Nov 2007 00:04:02 +0200
From: Eli Zaretskii <address@hidden>
Cc: address@hidden, address@hidden, address@hidden

   find -name *l.el
   find -name m*.el
   find -name "*.el"
Sheer luck, the first tow ones.  You _must_ quote the wildcard to get
predictable behavior.

To give you a hint: whether unquoted wildcards work or not depends on
whether files in the directory where you run the above commands do or
do not have files that match the wildcards you give to `find'.  That's
because the startup code which tries to expand wildcards leaves them
intact if they don't match anything in the current directory, which
has the same effect as quoting them.

Take for example the following command:

  find c:/emacs -name *l.el

Assuming c:/emacs is the root of the Emacs source tree, try to type
this once from the c:/emacs/lisp directory and then from a directory
that doesn't have any *.el files, and you will see different behavior
(the first one should err out).

Actually that does not happen to me. You may of course still be right that quoting is required, but I have never argued that it is not required. I am just trying to tell how things work and obviously that may be important since the assumption you made is not entirely correct.

That's why I said that you _must_ quote wildcards to get predictable
behavior from `find'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]