Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: turning off quote interpolation
- X-seq: zsh-users 7372
 
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
 
- To: zsh-users@xxxxxxxxxx
 
- Subject: Re: turning off quote interpolation
 
- Date: Tue, 20 Apr 2004 04:00:14 +0000
 
- In-reply-to: <20040419162224.GR11257@xxxxxxxxxxxx>
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
 
- References: <20040419111834.GL11257@xxxxxxxxxxxx> 	<87oepox7pz.fsf@xxxxxxxxxxxxxxxx> 	<20040419162224.GR11257@xxxxxxxxxxxx>
 
On Apr 19,  6:22pm, Eric Smith wrote:
} 
} goo () {
}   w3m "http://www.google.com/search?q=$1+$2+$3+$4+$5+$6+$7+$8&num=100"
} }
Question:  Does it harm anything to include quotes when they aren't
needed?
goo() {
  w3m "http://www.google.com/search?q=${(j:+:)${(qqq)@}}&num=100"
}
With that def'n, the command
	goo "foo bar" baz
calls w3m on a URL that looks like
	http://www.google.com/search?q="foo bar"+"baz"&num=100
where the quotes around "baz" are extraneous but (I think) harmless.
Note though that also with that def'n the command
	goo 'foo " bar'
produces the URL
	http://www.google.com/search?q="foo \" bar"&num=100
in which the backslash may not do what you want.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author