Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _archie



I wrote a completion function for _archie.

But it has a problem.

Z:akr@is27e1u11% Src/zsh -f
is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d'
is27e1u11% compconf describe_options=yes describe_values=yes option_prefix=yes
is27e1u11% archie -<TAB>

->

is27e1u11% archie -
string

Why aren't descriptions of options displayed?

This is also occured in plain 3.1.6-pws-6 after s/opt_args/options/.

--- /dev/null	Sat Oct 16 12:11:10 1999
+++ Completion/User/_archie	Sat Oct 16 13:42:43 1999
@@ -0,0 +1,30 @@
+#compdef archie
+
+local state line
+typeset -A opt_args
+
+_arguments -s \
+  '-D[debug level]' \
+  '-v[print version]' \
+  '-V[verbose mode]' \
+  '-O[specifies offset]:offset:' \
+  '-a[list matches as Alex filenames]' \
+  '-c[case sensitive substring search]' \
+  '-e[exact string match (default)]' \
+  '-r[regular expression search]' \
+  '-s[case insensitive substring search]' \
+  '-l[list one match per line]' \
+  '-t[sort inverted by date]' \
+  '-m[specifies maximum number of hits to return (default 95)]:hits to return:' \
+  '-o[specifies file to store results in]:file to store:' \
+  '-h[specifies server host]:server host:->serverhost' \
+  '-L[list known servers and current default]' \
+  '-N-[specifies query niceness level (0-35765)]:niceness level:' \
+  ':string:'
+
+case "$state" in
+serverhost)
+  : ${(A)archie_servers:=${(M)$(archie -L):#archie.*}}
+  compadd $archie_servers
+  ;;
+esac
-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author