[Top][All Lists]

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

Re: address@hidden: grep-tree doesn't shell-quote-argument]

From: Eli Zaretskii
Subject: Re: address@hidden: grep-tree doesn't shell-quote-argument]
Date: Tue, 18 Apr 2006 17:44:58 +0300

> From: address@hidden (Kim F. Storm)
> Date: Tue, 18 Apr 2006 16:02:44 +0200
> Cc: Magnus Henoch <address@hidden>, address@hidden
> Richard Stallman <address@hidden> writes:
> > Since M-x grep does not do this, I am not sure it is desirable
> > to make M-x grep-tree incompatible with it.  But I don't use
> > grep-tree.  What do others think?
> M-x grep prompts for the entire command line, so the user can easily
> add the necessary quoting of the regexp.

How easily is that is not very important in this case, IMO.  What is
important is that "M-x grep" prompts for _a_shell_command_, and the
user should type there a command that she would type at a shell's
prompt.  Which means the _user_ is responsible for any quoting that's
required, especially since "M-x grep" has no real understanding of the
command's semantics; it is just reading a string that it will pass to

> M-x grep-tree prompts individually for the regexp, files, and directory,
> so I think it makes good sense to quote the regexp automatically.

In this case, grep-tree does know what is the semantics of each part
of the command, since it prompts for them individually.  So I agree.

Btw, isn't it confusing that we have no less than 3 different commands
(find-grep-dired, grep-find, and grep-tree) to do the same job?

reply via email to

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