From: Paul Lew <paullew@cisco.com>
To: zsh-users@sunsite.auc.dk
Subject: Bart's urlglobber question
Date: Thu, 3 Oct 2002 08:28:51 -0700 [thread overview]
Message-ID: <15772.25139.506561.955462@paullew-ultra.cisco.com> (raw)
I am trying to use the urlglobber but there is a problem:
> w3m http://yahoo.com/?id=test&name=paul&addr=home
zsh: parse error near `&'
> echo $ZSH_VERSION
4.0.5
Seems noglob does not handle the '&' because pure simple:
> noglob foo&bar
will not work either. So zsh will treat the above statement as:
'noglob foo' & and 'bar'
then how can I ever achieve the original goal of not supplying quotes
when using w3m?
BTW, the definitions for w3m is:
> alias w3m='globurl w3m'
> alias globurl='noglob urlglobber'
The urlglobber came from:
# Bart Schaefer" <schaefer@brasslantern.com>
# Fri, 30 Aug 2002 05:31:59 +0000
function urlglobber {
local -a args globbed
local arg command="$1"
shift
for arg; do
case "${arg}" in
(ftp://(|localhost)/*)
globbed=( ${~${arg##ftp://(localhost|)}} )
args[$#args+1]=(
"${(M)arg##ftp://(localhost|)}${(@)^globbed}" )
;;
((http(|s)|ftp):*) args[$#args+1]="$arg";;
(*) args[$#args+1]=( ${~arg} );;
esac
done
"$command" "${(@)args}"
}
next reply other threads:[~2002-10-03 15:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-03 15:28 Paul Lew [this message]
2002-10-03 16:09 ` Bart Schaefer
2002-10-03 17:25 ` Bart's urlglobber question [url-magic-space] Paul Lew
2002-10-03 17:55 ` Bart Schaefer
2002-10-05 19:43 ` Bart Schaefer
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=15772.25139.506561.955462@paullew-ultra.cisco.com \
--to=paullew@cisco.com \
--cc=zsh-users@sunsite.auc.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).