[Surfraw-devel] Misc. annoyances

Ian Beckwith ianb at nessie.mcc.ac.uk
Tue Jul 11 00:22:10 UTC 2006


On Mon, Jul 10, 2006 at 05:33:45PM -0400, maru dubshinki wrote:
> So, I've been using sufraw for the past couple of months (in
> conjunction with ratpoison; for how I integrated surfraw with
> ratpoison, see http://en.wikipedia.org/User:Marudubshinki/.ratpoisonrc)

Cool, I've been thinking of trying out ratpoison, so this will be
useful when I do, thanks.

> The second I don't know how to fix. Anytime my many search terms
> include any special characters (from a shell's POV), it completely
> screws up. Enclosing things in quotes doesn't help, since those quotes
> seem to themselves just be passed to the web page (ie, I want to go to
> [[Barnum & Bailey's]] on Wikipedia, with that exact title, perhaps to
> check a broken redirect or something, and the & screws the shell up;
> if I quote it, then I'm sent to the Wikipedia article [["Barnum &
> Bailey's"]], which is not good!). The -q option doesn't seem to help.

This is caused by surfraw trying to be clever and add back quote
characters that the shell strips off. The fix is to set 
SURFRAW_quote_ifs to 0 in the wikipedia elvi (see attached patch).

It's now fixed in CVS.

Ian.

-- 
Ian Beckwith - ianb at nessie.mcc.ac.uk - http://nessie.mcc.ac.uk/~ianb/
GPG fingerprint: AF6C C0F1 1E74 424B BCD5  4814 40EC C154 A8BA C1EA
Listening to: John Vanderslice - Cool Purple Mist
-------------- next part --------------
Index: elvi/wikipedia
===================================================================
RCS file: /cvsroot/surfraw/surfraw/elvi/wikipedia,v
retrieving revision 1.2
diff -u -r1.2 wikipedia
--- elvi/wikipedia	6 Feb 2004 00:31:05 -0000	1.2
+++ elvi/wikipedia	11 Jul 2006 00:00:39 -0000
@@ -36,6 +36,8 @@
 }
 
 w3_config
+# disable requoting, doesn't work with this elvi.
+SURFRAW_quote_ifs=0
 w3_parse_args "$@"
 
 prefix="http://${SURFRAW_wikipedia_language}.wikipedia.org/w/wiki.phtml?search="


More information about the Surfraw-devel mailing list