This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Mailing list redirection etiquette?
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Dave Korn <dk at artimi dot com>
- Cc: cygwin at cygwin dot com
- Date: Wed, 6 Oct 2004 14:09:11 -0400 (EDT)
- Subject: RE: Mailing list redirection etiquette?
- References: <NUTMEGzYFfa5hr6fGny000002d7@NUTMEG.CAM.ARTIMI.COM>
- Reply-to: cygwin at cygwin dot com
On Wed, 6 Oct 2004, Dave Korn wrote:
> > -----Original Message-----
> > From: cygwin-owner On Behalf Of Fred Kulack
> > Sent: 06 October 2004 17:29
>
> > From your command prompt, use:
> > > google cygwin acronym list
> >
> > If that doesn't work, setup this function:
> > > typeset -f google
> > google ()
> > {
> > url="http://www.google.com";
> > separator="/search?q=";
> > for i in $@;
> > do
> > url="${url}${separator}${i}";
> > separator="+";
> > done;
> > echo "Starting: $url";
> > ~/bin/firefox "$url" &
> > }
>
> Nice one! Can I just suggest one little change:
>
> ======================================
> echo "Starting: $url";
> - ~/bin/firefox "$url" &
> + cygstart "$url" &
> }
>
> which should be more generic across different browsers etc.
FWIW,
typeset -f google
google () {
IFS=+; url="http://www.google.com/search?q=$*";
echo "Starting: $url"; cygstart -o "$url" >/dev/null
}
but this won't quote the arguments properly -- if you want that, you need
something like
google () {
url="http://www.google.com/search?q=`echo -n $*|perl -mCGI -pe '$_=CGI::escape($_)'`";
echo "Starting: $url"; cygstart -o "$url" >/dev/null
}
instead. HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/