zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: turning off quote interpolation
Date: Tue, 20 Apr 2004 04:00:14 +0000	[thread overview]
Message-ID: <1040420040014.ZM11953@candle.brasslantern.com> (raw)
In-Reply-To: <20040419162224.GR11257@fruitcom.com>

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.


      parent reply	other threads:[~2004-04-20  4:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-19 11:18 Eric Smith
2004-04-19 16:17 ` Philippe Troin
2004-04-19 16:22   ` Eric Smith
2004-04-19 16:56     ` Phil Pennock
2004-04-20  4:00     ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1040420040014.ZM11953@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).