* Re: PATCH: _archie
@ 1999-10-18 9:16 Sven Wischnowsky
1999-10-20 16:15 ` Tanaka Akira
0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 1999-10-18 9:16 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> 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?
Combination of `computil' not reporting that options are allowed at
that position and a bit of stupidity in `_arguments'.
You are writing a lot of interesting completion functions, very nice,
thank you.
And before I forget to mention it... if someone wonders why I changed
`_dvi' to use `_arguments' a while ago, but didn't change `_ps' and
`_pspdf' and why I added `_yp', but not `_nis' (for the NIS+
commands): it's because I don't have many of the commands mentioned in
`_ps' and `_pspdf' and we don't have NIS+ installed here, so I
couldn't test a completion function for it. So if someone finds the
time...
Bye
Sven
diff -u oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Mon Oct 18 11:10:39 1999
+++ Src/Zle/computil.c Mon Oct 18 11:10:52 1999
@@ -976,13 +976,13 @@
else
state.curopt = NULL;
} else {
- state.opt = (line[0] && line[1]);
+ state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
state.arg = 1;
state.curopt = NULL;
}
pe = NULL;
- if (state.opt && (state.curopt = ca_get_opt(d, line, 0, &pe))) {
+ if (state.opt == 2 && (state.curopt = ca_get_opt(d, line, 0, &pe))) {
ddef = state.def = state.curopt->args;
doff = pe - line;
state.optbeg = state.argbeg = state.inopt = cur;
@@ -1009,7 +1009,7 @@
}
if (!state.def)
state.curopt = NULL;
- } else if (state.opt && d->single &&
+ } else if (state.opt == 2 && d->single &&
(state.curopt = ca_get_sopt(d, line, 0, &pe))) {
char *p;
Caopt tmpopt;
diff -u oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments Mon Oct 18 09:48:45 1999
+++ Completion/Base/_arguments Mon Oct 18 11:11:27 1999
@@ -190,7 +190,6 @@
[[ -n "$matched" ]] && compadd -n -Q -S '' -s "$SUFFIX" - "$PREFIX"
_message "$descr"
- break
elif [[ "$action" = \(\(*\)\) ]]; then
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PATCH: _archie
1999-10-18 9:16 PATCH: _archie Sven Wischnowsky
@ 1999-10-20 16:15 ` Tanaka Akira
0 siblings, 0 replies; 8+ messages in thread
From: Tanaka Akira @ 1999-10-20 16:15 UTC (permalink / raw)
To: zsh-workers
In article <199910180916.LAA25903@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> Combination of `computil' not reporting that options are allowed at
> that position and a bit of stupidity in `_arguments'.
Thanks. First <TAB> works well now. But second <TAB> doesn't.
Z(2):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><TAB>
string
option
-D -- debug level
-L -- list known servers and current default
-N -- specifies query niceness level (0-35765)
-O -- specifies offset
-V -- verbose mode
-a -- list matches as Alex filenames
-c -- case sensitive substring search
-e -- exact string match (default)
-h -- specifies server host
-l -- list one match per line
-m -- specifies maximum number of hits to return (default 95)
-o -- specifies file to store results in
-r -- regular expression search
-s -- case insensitive substring search
-t -- sort inverted by date
-v -- print version
I think second <TAB> should insert "D" to command line, but zsh
doesn't insert anything.
--
Tanaka Akira
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PATCH: _archie
@ 1999-10-21 12:42 Sven Wischnowsky
0 siblings, 0 replies; 8+ messages in thread
From: Sven Wischnowsky @ 1999-10-21 12:42 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> Z(2):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
>
> (1) archie -O<TAB>
Whoa. I did quite a bit of testing but...
> (2) flex -C<TAB><TAB>
Oops. This works correctly for me. Hm, what am I doing wrong... (or right)
However, I forgot to include a hunk in `_values' for this one.
> (3) bison -ba <TAB>
So the argument may come directly after the `-b'... this needed only a
fix in `_bison' (since it expected the argument of `-b' to be in the
next word it thought that `-ba' wasn't an option string and hence took
it for the first and only argument).
> (4) bison -Vba -<TAB>
Same reason and fix as for (3), it didn't consider `-Vba' to be an
option string.
Bye
Sven
diff -u oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Thu Oct 21 12:31:50 1999
+++ Src/Zle/computil.c Thu Oct 21 14:31:47 1999
@@ -696,7 +696,8 @@
opt->name = ztrdup(name);
if (descr)
opt->descr = ztrdup(descr);
- else if (adpre && oargs && !oargs->next)
+ else if (adpre && oargs && !oargs->next &&
+ oargs->descr && oargs->descr[0])
opt->descr = tricat(adpre, oargs->descr, adsuf);
else
opt->descr = NULL;
@@ -1118,8 +1119,15 @@
ca_laststate.doff = 0;
} else if (cur == compcurrent && !ca_laststate.def) {
if ((ca_laststate.def = ddef)) {
- ca_laststate.doff = doff;
- ca_laststate.opt = 0;
+ ca_laststate.singles = state.singles;
+ if (state.curopt && state.curopt->type == CAO_NEXT) {
+ ca_laststate.ddef = ddef;
+ ca_laststate.def = NULL;
+ ca_laststate.opt = 1;
+ } else {
+ ca_laststate.doff = doff;
+ ca_laststate.opt = 0;
+ }
} else {
ca_laststate.def = adef;
ca_laststate.ddef = NULL;
diff -u -r oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments Thu Oct 21 10:33:22 1999
+++ Completion/Base/_arguments Thu Oct 21 14:38:12 1999
@@ -71,7 +71,7 @@
lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/
--}:#[ ]#-*}//,/
-}}:#[ ]#--*}#*--}%%[, ]*}:#}")
+}}:#[ ]#--*}#*--}%%[], ]*}:#}")
# Now remove all ignored options ...
@@ -227,7 +227,8 @@
if [[ -z "$matched" ]] &&
comparguments -O next direct odirect equal &&
- [[ ( ( nm -eq compstate[nmatches] || -n "$noargs" ) && -z "$aret" ) ||
+ [[ ( ( nm -eq compstate[nmatches] || -n "$noargs" ) &&
+ -z "$aret" && -z "$mesg" ) ||
-z "$compconfig[option_prefix]" ||
"$compconfig[option_prefix]" = *\!${cmd}* ||
"$PREFIX" = [-+]* ]]; then
@@ -246,6 +247,7 @@
compadd "$expl[@]" -QqS= - "${PREFIX}${SUFFIX}"
else
tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" )
+ tmp1=( "${(M@)tmp1:#[-+]?(|:*)}" )
tmp2=( "${PREFIX}${(@M)^${(@)${(@)tmp1%%:*}#[-+]}:#?}" )
_describe -o -c "$cmd" option tmp1 tmp2 -Q -S ''
diff -u -r oldcompletion/Base/_values Completion/Base/_values
--- oldcompletion/Base/_values Thu Oct 21 08:58:56 1999
+++ Completion/Base/_values Thu Oct 21 11:45:48 1999
@@ -36,7 +36,7 @@
else
compvalues -d descr
if [[ ${#noargs}+${#args}+${#opts} -ne 1 ]] && compvalues -s sep; then
- sep=( "-qQS$sep" )
+ sep=( "-qQS" "$sep" )
else
sep=()
fi
diff -u -r oldcompletion/User/_bison Completion/User/_bison
--- oldcompletion/User/_bison Thu Oct 21 10:33:31 1999
+++ Completion/User/_bison Thu Oct 21 13:42:09 1999
@@ -1,14 +1,14 @@
#compdef bison
_arguments -s \
- '(--file-prefix)-b[specify output file prefix]:output file prefix:' \
+ '(--file-prefix)-b+[specify output file prefix]:output file prefix:' \
'(--defines)-d[write token definition file]' \
'(--raw)-r[output bison token numbers]' \
'(--token-table)-k[output token table]' \
'(--no-lines)-l[don'"'"'t generate #line directives]' \
'(--no-parser)-n[don'"'"'t generate parse (only declarations)]' \
- '(--output-file)-o[specify parser output file name]:parser file name:_files' \
- '(--name-prefix)-p[change yy prefix]:prefix string:' \
+ '(--output-file)-o+[specify parser output file name]:parser file name:_files' \
+ '(--name-prefix)-p+[change yy prefix]:prefix string:' \
'(--debug)-t[output YYDEBUG definition]' \
'(--verbose)-v[verbose mode]' \
'(--version)-V[show version]' \
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PATCH: _archie
@ 1999-10-21 10:31 Sven Wischnowsky
1999-10-21 11:28 ` Tanaka Akira
0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 1999-10-21 10:31 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> Z(2):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
>
> (1) archie -N<TAB>
> flex -C<TAB> has same problem.
> (2) bison -b <TAB>
> (3) bison -vV<TAB>
> (4) cvs -<TAB>
Aargh! Sorry.
Bye
Sven
diff -u oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Thu Oct 21 10:33:09 1999
+++ Src/Zle/computil.c Thu Oct 21 12:28:22 1999
@@ -863,8 +863,6 @@
} else if (!p || !p->active || (line[1] && p->args) ||
p->name[0] != pre)
return NULL;
- else
- p = NULL;
if (p && end)
*end = line;
return p;
@@ -973,7 +971,7 @@
addlinknode(state.oargs[state.curopt->num], ztrdup(line));
} LASTALLOC;
}
- state.opt = (state.def->type == CAA_OPT && line[0] && line[1]);
+ state.opt = (state.def->type == CAA_OPT);
if (state.def->type == CAA_REST || state.def->type == CAA_RARGS ||
state.def->type == CAA_RREST) {
@@ -984,13 +982,17 @@
}
} else if ((state.def = state.def->next))
state.argbeg = cur;
- else
+ else {
state.curopt = NULL;
+ state.opt = 1;
+ }
} else {
- state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
- state.arg = 1;
+ state.opt = state.arg = 1;
state.curopt = NULL;
}
+ if (state.opt)
+ state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
+
pe = NULL;
if (state.opt == 2 && (state.curopt = ca_get_opt(d, line, 0, &pe))) {
@@ -1018,7 +1020,9 @@
addlinknode(state.oargs[state.curopt->num], ztrdup(pe));
} LASTALLOC;
}
- if (!state.def)
+ if (state.def)
+ state.opt = 0;
+ else
state.curopt = NULL;
} else if (state.opt == 2 && d->single &&
(state.curopt = ca_get_sopt(d, line, 0, &pe))) {
@@ -1051,7 +1055,9 @@
addlinknode(state.oargs[state.curopt->num], ztrdup(pe));
} LASTALLOC;
}
- if (!state.def)
+ if (state.def)
+ state.opt = 0;
+ else
state.curopt = NULL;
} else if (state.arg) {
if (state.inopt) {
@@ -1062,7 +1068,7 @@
(state.def->type == CAA_RREST ||
state.def->type == CAA_RARGS)) {
state.inrest = 0;
- state.opt = 0;
+ state.opt = (cur == state.nargbeg + 1);
state.optbeg = state.nargbeg;
state.argbeg = cur - 1;
@@ -1111,9 +1117,10 @@
ca_laststate.ddef = NULL;
ca_laststate.doff = 0;
} else if (cur == compcurrent && !ca_laststate.def) {
- if ((ca_laststate.def = ddef))
+ if ((ca_laststate.def = ddef)) {
ca_laststate.doff = doff;
- else {
+ ca_laststate.opt = 0;
+ } else {
ca_laststate.def = adef;
ca_laststate.ddef = NULL;
ca_laststate.optbeg = state.nargbeg;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PATCH: _archie
1999-10-21 10:31 Sven Wischnowsky
@ 1999-10-21 11:28 ` Tanaka Akira
0 siblings, 0 replies; 8+ messages in thread
From: Tanaka Akira @ 1999-10-21 11:28 UTC (permalink / raw)
To: zsh-workers
In article <199910211031.MAA04855@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> Aargh! Sorry.
Thanks. But...
Z(2):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
(1) archie -O<TAB>
is27e1u11% archie -O<TAB>
offset
Since the option spec for -O is specified as
'-O[specifies offset]:offset:' in _archie, one space should be
inserted by <TAB> as:
is27e1u11% archie -O
^cursor should be here.
(2) flex -C<TAB><TAB>
is27e1u11% flex -C<TAB><TAB>
->
is27e1u11% flex -C--M
(3) bison -ba <TAB>
is27e1u11% bison -ba <TAB>
no more arguments
option
-V -- show version
-b -- specify output file prefix
...
File names should be completed.
(4) bison -Vba -<TAB>
is27e1u11% bison -Vba -<TAB>
option
-V -- show version
-b -- specify output file prefix
...
Since -V is already specified in first argument, it shouldn't be
listed.
--
Tanaka Akira
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PATCH: _archie
@ 1999-10-21 8:32 Sven Wischnowsky
1999-10-21 9:05 ` Tanaka Akira
0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 1999-10-21 8:32 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
>
> > Combination of `computil' not reporting that options are allowed at
> > that position and a bit of stupidity in `_arguments'.
>
> Thanks. First <TAB> works well now. But second <TAB> doesn't.
>
> ...
>
> I think second <TAB> should insert "D" to command line, but zsh
> doesn't insert anything.
That was caused by `_arguments' invoking `_message' too early. That
added an empty string as a match and set `compstate[insert]' to an
empty string -- which then inhibitied the start of menucompletion.
> (1) flex -<TAB> show the option "+" incorrectly.
Parsing bug in `computil'. It took it as one of those both-`-'-and`+'-
options.
> (2) bison <TAB> doesn't complete files at all.
>
> is27e1u11% bison <TAB>
>
> In pws-6, it completes files in current directory.
>
> # I found that _bison doesn't treat *.y specialy...
> # It should be treated as well as *.(yacc|bison).
It completed files for me, so I've just added the `*.y' case. Maybe
you tried it without 8340?
> (3) bison Sr<TAB> completes option letters after "Sr"
Ouch. The code didn't test for the leading `[-+]' so it thought it had
found `-r'.
> (4) cvs add <TAB> completes cvs commands.
This is to be fixed by 8340.
Bye
Sven
diff -u oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Thu Oct 21 08:59:16 1999
+++ Src/Zle/computil.c Thu Oct 21 10:28:49 1999
@@ -583,8 +583,10 @@
if ((multi = (*p == '*')))
p++;
- if ((p[0] == '-' && p[1] == '+') ||
- (p[0] == '+' && p[1] == '-')) {
+ if (((p[0] == '-' && p[1] == '+') ||
+ (p[0] == '+' && p[1] == '-')) &&
+ p[2] && p[2] != ':' && p[2] != '[' &&
+ p[2] != '=' && p[2] != '-' && p[2] != '+') {
name = ++p;
*p = (again ? '-' : '+');
again = 1 - again;
@@ -593,7 +595,12 @@
if (p[0] == '-' && p[1] == '-')
p++;
}
- for (p++; *p && *p != ':' && *p != '[' &&
+ if (!p[1]) {
+ free_cadef(ret);
+ zerrnam(nam, "invalid argument: %s", *args, 0);
+ return NULL;
+ }
+ for (p += 2; *p && *p != ':' && *p != '[' &&
((*p != '-' && *p != '+' && *p != '=') ||
(p[1] != ':' && p[1] != '[')); p++)
if (*p == '\\' && p[1])
@@ -834,8 +841,7 @@
ca_get_sopt(Cadef d, char *line, int full, char **end)
{
Caopt p;
-
- line++;
+ char pre = *line++;
if (full) {
for (p = NULL; *line; line++)
@@ -846,7 +852,7 @@
} else {
for (p = NULL; *line; line++)
if ((p = d->single[STOUC(*line)]) && p->active &&
- p->args && p->type != CAO_NEXT) {
+ p->args && p->type != CAO_NEXT && p->name[0] == pre) {
if (end) {
line++;
if (p->type == CAO_EQUAL && *line == '=')
@@ -854,9 +860,12 @@
*end = line;
}
break;
- } else if (!p || !p->active || (line[1] && p->args))
+ } else if (!p || !p->active || (line[1] && p->args) ||
+ p->name[0] != pre)
return NULL;
- if (end)
+ else
+ p = NULL;
+ if (p && end)
*end = line;
return p;
}
diff -u -r oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments Thu Oct 21 08:58:54 1999
+++ Completion/Base/_arguments Thu Oct 21 09:21:03 1999
@@ -5,7 +5,7 @@
setopt localoptions extendedglob
-local long cmd="$words[1]" descr
+local long cmd="$words[1]" descr mesg
long=$argv[(I)--]
if (( long )); then
@@ -189,7 +189,7 @@
# An empty action means that we should just display a message.
[[ -n "$matched" ]] && compadd -n -Q -S '' -s "$SUFFIX" - "$PREFIX"
- _message "$descr"
+ mesg="$descr"
elif [[ "$action" = \(\(*\)\) ]]; then
@@ -286,6 +286,7 @@
[[ -n "$aret" ]] && return 300
+ [[ -n "$mesg" ]] && _message "$mesg"
[[ -n "$noargs" ]] && _message "$noargs"
# Set the return value.
diff -u -r oldcompletion/User/_bison Completion/User/_bison
--- oldcompletion/User/_bison Thu Oct 21 08:59:03 1999
+++ Completion/User/_bison Thu Oct 21 10:15:44 1999
@@ -14,7 +14,7 @@
'(--version)-V[show version]' \
'(--help)-h[show help]' \
'(--yacc --fixed-output-file)-y[imitate yacc'"'"'s output file convention]' \
- ':input file:_files -g \*.\(\#i\)\(bison\|yacc\)' \
+ ':input file:_files -g \*.\(\#i\)\(bison\|yacc\|y\)' \
-- \
'*=outfile:parser file name:_files' \
'*file-prefix=prefix:output file prefix:' \
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: PATCH: _archie
1999-10-21 8:32 Sven Wischnowsky
@ 1999-10-21 9:05 ` Tanaka Akira
0 siblings, 0 replies; 8+ messages in thread
From: Tanaka Akira @ 1999-10-21 9:05 UTC (permalink / raw)
To: zsh-workers
In article <199910210832.KAA32127@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> It completed files for me, so I've just added the `*.y' case. Maybe
> you tried it without 8340?
Yes. I received 8340 after I sent 8343.
Thanks. All reported problems are fixed. But...
Now, I use zsh with patches up to 8352.
Z(2):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
(1) archie -N<TAB>
is27e1u11% archie -N<TAB><TAB>
->
is27e1u11% archie -N-D
flex -C<TAB> has same problem.
(2) bison -b <TAB>
is27e1u11% bison -b <TAB><TAB><TAB>
->
is27e1u11% bison -b V
(3) bison -vV<TAB>
is27e1u11% bison -vV<TAB>
It should complete other option letters.
(4) cvs -<TAB>
is27e1u11% cvs -<TAB>
is27e1u11% _tst () { _arguments -o '*::msg:_files' }
is27e1u11% tst -<TAB>
Although they complete nothing, they should complete options.
--
Tanaka Akira
^ permalink raw reply [flat|nested] 8+ messages in thread
* PATCH: _archie
@ 1999-10-16 4:47 Tanaka Akira
0 siblings, 0 replies; 8+ messages in thread
From: Tanaka Akira @ 1999-10-16 4:47 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1999-10-21 12:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-18 9:16 PATCH: _archie Sven Wischnowsky
1999-10-20 16:15 ` Tanaka Akira
-- strict thread matches above, loose matches on Subject: below --
1999-10-21 12:42 Sven Wischnowsky
1999-10-21 10:31 Sven Wischnowsky
1999-10-21 11:28 ` Tanaka Akira
1999-10-21 8:32 Sven Wischnowsky
1999-10-21 9:05 ` Tanaka Akira
1999-10-16 4:47 Tanaka Akira
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).