Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: turning off quote interpolation
- X-seq: zsh-users 7371
- From: Phil Pennock <phil.pennock@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: turning off quote interpolation
- Date: Mon, 19 Apr 2004 18:56:46 +0200
- In-reply-to: <20040419162224.GR11257@xxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040419111834.GL11257@xxxxxxxxxxxx> <87oepox7pz.fsf@xxxxxxxxxxxxxxxx> <20040419162224.GR11257@xxxxxxxxxxxx>
- Sender: Phil Pennock <phil@xxxxxxxxxxxxx>
On 2004-04-19 at 18:22 +0200, Eric Smith wrote:
> goo () {
> w3m "http://www.google.com/search?q=$1+$2+$3+$4+$5+$6+$7+$8&num=100"
> }
If memory serves, you can't turn off the quoting stuff since that
happens well before it's passed to a function or alias.
FWIW, the power of zsh lets you do something like join the elements of
an array together with a specified string used between each element.
Eg, my equivalent function is defined as:
function google {
${WebBrowser:-w3m} "http://www.google.com/search?q=${(j:+:)@}"
}
So, something like:
function goo { w3m "http://www.google.com/search?q=${(j:+:)@}&num=100" }
should help you get rid of that limit which you have.
Beyond that, it's just a matter of getting into the habit of trapping
quotes around strings, to allow things like & in a URL.
I got in the habit of things like:
% google '"Elizabeth Moon"'
to look up information on one of my favourite authors, for instance.
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author