[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired-do-shell-command: cannot escape the *
From: |
David Masterson |
Subject: |
Re: dired-do-shell-command: cannot escape the * |
Date: |
28 Dec 2001 09:33:23 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> Richard Stallman writes:
>> What's wrong with having dired-do-shell-command ignore the * if it
>> is escaped with a backslash?
> Then people have to wonder about what to do if they want to put
> backslash-* into the shell command. In other words, this isn't as
> simple in practice as it sounds.
Hmmm. I suppose you could escape the backslash?
That is, dired-do-shell-command [and others?] would always assume that
a backslash is escaping the next character (ie. removing special
meaning from it). If the next character is a backslash, then a single
backslash is passed. If the next character is a '*', then the '*' is
passed (and, so, '\\\*' would become '\*'). This is a uniform
approach that everyone should understand, but I'm not sure if it looks
right... :-\
The other approach is to change dired-do-shell-command to assume that
'\*' is the special character that gets filled in with the marked
filenames. I guess that this would also have to assume the previous
paragraph to allow people to type '\\*' and have '\*' passed to the
shell command. This seems to be a less uniform approach, though, so I
like it less... :-\
The basic problem is that a non-special character has been given
special significance for dired-do-shell-command, but there are (many)
times you want to use that character without its special significance.
I don't suppose you could type '^Q*' (ie. the Emacs escape mechanism)
to dired-do-shell-command and have it recognize that as either "place
all files here" or "pass a * to the shell" (whichever seems more
appropriate)?
--
David Masterson dmaster AT synopsys DOT com
Sr. R&D Engineer Synopsys, Inc.
Software Engineering Sunnyvale, CA