zsh-users
 help / color / mirror / code / Atom feed
* Completion and surfraw
@ 2005-04-21 22:28 Philippe Berini
  2005-04-21 23:40 ` Clint Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Berini @ 2005-04-21 22:28 UTC (permalink / raw)
  To: zsh-users

Hi all,

I am new to zsh. The completion works well, I use a .zshrc that I found
in a tutorial on the web.

Up to now, the only problem is with surfraw: with bash, I used to type:

% sr [TAB] 

and I was proposed the elvi list (alioth, altavista, amazon etc.) to
complete.
With zsh however, I get the files of the directory I'm in.

I found nothing in the archive or Google about that. Sorry if it is a
FAQ... I run Debian Sid, zsh 4.2.5-3, surfraw 2.1.0-1.

Any pointer will be welcome.
-- 
Philippe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Completion and surfraw
  2005-04-21 22:28 Completion and surfraw Philippe Berini
@ 2005-04-21 23:40 ` Clint Adams
  2005-04-22  0:10   ` Philippe Berini
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2005-04-21 23:40 UTC (permalink / raw)
  To: zsh-users

> Up to now, the only problem is with surfraw: with bash, I used to type:
> 
> % sr [TAB] 
> 
> and I was proposed the elvi list (alioth, altavista, amazon etc.) to
> complete.
> With zsh however, I get the files of the directory I'm in.

Someone has written a completion function for bash, but not for zsh.
Here's a start.  Someone who actually uses surfraw should flesh it out
more.

Index: Completion/Unix/Command/_surfraw
===================================================================
RCS file: Completion/Unix/Command/_surfraw
diff -N Completion/Unix/Command/_surfraw
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_surfraw	21 Apr 2005 23:35:45 -0000
@@ -0,0 +1,15 @@
+#compdef surfraw sr
+
+_arguments \
+   '-browser=[set browser]:browser:_command_names' \
+   '-elvi[list Surfraw mechanisms for conquering evil]' \
+   '-escape-url-args=[apply url escaping to arguments]:bool:(yes no)' \
+   '(-g -graphical)'{-g,-graphical}'[get some windowed sin]' \
+   '-p0rn=[Yes, yes, harder, deeper, faster, oh baybe]:bool:(yes no)' \
+   '-help' \
+   '-quiet:bool:(yes no)' \
+   '-new[start in a new window]' \
+   '(-t -text)'{-t,-text}'[back to the yellow brick road]' \
+   '(-q -quote)'{-q,-quote}'[Quote arguments with quote characters]' \
+   '-version[display Surfraw version]' \
+   ':elvi: compadd ${${(f)"$(surfraw -elvi)"}%%[[:space:]]##--*}'


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Completion and surfraw
  2005-04-21 23:40 ` Clint Adams
@ 2005-04-22  0:10   ` Philippe Berini
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Berini @ 2005-04-22  0:10 UTC (permalink / raw)
  To: zsh-users

* Clint Adams <clint@zsh.org> [Thu, Apr 21, 2005 at 07:40:06PM -0400]:

> Someone has written a completion function for bash, but not for zsh.
> Here's a start.  Someone who actually uses surfraw should flesh it out
> more.

Thank you very much for this answer. At least I know that my zsh
configuration is not concerned... and I'll wait for somebody wiser than
me to solve the problem :-) 

Cheers,
-- 
Philippe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-22  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-21 22:28 Completion and surfraw Philippe Berini
2005-04-21 23:40 ` Clint Adams
2005-04-22  0:10   ` Philippe Berini

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).