From: Vincent Lefevre <vincent@vinc17.org>
To: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: zsh-4.04 and w3m browser
Date: Wed, 28 Aug 2002 17:33:46 +0200 [thread overview]
Message-ID: <20020828153346.GF13666@greux.loria.fr> (raw)
In-Reply-To: <1020828152500.ZM7603@candle.brasslantern.com>
On Wed, Aug 28, 2002 at 15:25:00 +0000, Bart Schaefer wrote:
> ---- 8< ---- snip ---- 8< ----
> 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}"
> }
> alias globurl='noglob urlglobber'
> alias ncftp='globurl ncftp'
> alias lynx='globurl lynx'
> alias w3m='globurl w3m'
> ---- 8< ---- snip ---- 8< ----
But how to make it work for any command? (and that should work even
when there are pipes and so on.)
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
next prev parent reply other threads:[~2002-08-28 15:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-28 11:23 Arthur Alinovi
2002-08-28 11:27 ` Peter Stephenson
2002-08-28 11:28 ` Roman Neuhauser
2002-08-28 11:30 ` Sven Wischnowsky
2002-08-28 11:36 ` Thomas Köhler
2002-08-28 12:18 ` Vincent Lefevre
2002-08-28 12:50 ` Peter Stephenson
2002-08-28 13:08 ` Vincent Lefevre
2002-08-28 15:25 ` Bart Schaefer
2002-08-28 15:33 ` Vincent Lefevre [this message]
2002-08-28 15:52 ` Bart Schaefer
2002-08-28 16:48 ` Wayne Davison
2002-08-30 5:31 ` 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=20020828153346.GF13666@greux.loria.fr \
--to=vincent@vinc17.org \
--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).