Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Another completion question
- X-seq: zsh-users 13618
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: Another completion question
- Date: Sat, 27 Dec 2008 17:41:33 -0800
- In-reply-to: <2d460de70812271648x4944fa1bpb9196881f7a83a96@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70812271648x4944fa1bpb9196881f7a83a96@xxxxxxxxxxxxxx>
On Dec 28, 1:48am, Richard Hartmann wrote:
}
} most of you will be familiar with this construct:
}
} -{h,-help}'[print help and exit]'
This is just a shorthand for
-h'[print help and exit]'
--help'[print help and exit]'
and is generated using the normal brace expansion rules. There's no
_arguments magic involved.
} my question is how I can exclude any options. The normal
} approach of
}
} '(-v)-h[print help and exit]'
}
} does not work, presumably because the -{h,-help} is outside of
} the single ticks.
It should work to do
'(-v)'-{h,-help}'[print help and exit]'
which just means
'(-v)-h[print help and exit]'
'(-v)--help[print help and exit]'
} Also, is there a way to use wildcards in the exclusion part at
} the beginning?
No. You can use (*) as a special case, meaning "the following may
not appear if there are any non-option arguments already on the line",
but otherwise you must make an explicit enumeration of the excusions.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author