Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: strictly literal command lines?




On Nov 3, 2009, at 3:05 PM, Eric De Mund wrote:

Hello,

I'd like to be able to issue a command without any quotation characters or with only one quotation character at the beginning. Is this possible
in zsh (ignore my line breaks here, done manually for legibility)?

% wget http://www.nytimes.com/2009/11/04/world/europe/ 04levistrauss\
   .html?hp=&pagewanted=print

In this particular example, the "&" is the problem for me. I want it
taken literally.

I can envision two kinds of solutions right off the bat.

1.  Is there a "literal-to-end-of-line" character? If the single quote
   (') were such a character, the command would look like this:

% wget 'http://www.nytimes.com/2009/11/04/world/europe/ 04levist\
       rauss.html?hp=&pagewanted=print

2.  Or is there an option to make a command line completely literal,
   akin to noglob but stronger, in order to handle ampersands (&)s and
   anything and everything else, too:

% literal wget http://www.nytimes.com/2009/11/04/world/europe/ 0\
       4levistrauss.html?hp=&pagewanted=print

Or am I missing some way of accomplishing this that already exists in
zsh?

Thanks,
Eric
--
Eric De Mund
ead@xxxxxxxxx

Of course I read your email too fast, and I see you already know about noglob. Sorry about that. I'll go back to lurking now...


--Mike



Messages sorted by: Reverse Date, Date, Thread, Author