Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: New completions for awk cut join sort - attached
- X-seq: zsh-workers 25019
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Omari Norman <omari@xxxxxxxxxxxxxxxxx>
- Subject: Re: New completions for awk cut join sort - attached
- Date: Tue, 13 May 2008 17:07:35 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20080513155532.GA17790@cameron>
- Mail-followup-to: Omari Norman <omari@xxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080513155532.GA17790@cameron>
On Tue, May 13, 2008 at 11:55:32AM -0400, Omari Norman wrote:
[...]
> # completions for awk
> # This only aims to complete POSIX awk options, as described in
> # awk(P). Most awk implementations, such as gawk and mawk, will have
> # additional options that this does not complete. Also, currently
> # this completion does not allow everything that POSIX allows. For
> # example, awk(P) states that the user may specify assignments
> # without using the -v option; this does not support that.
> #
> # In addition, the "program text" completion is not perfect. For
> # instance, type "awk -" and then hit tab. You will be presented
> # both with the dashed options and with the "program text" option.
> # Fixing this is beyond my current _arguments expertise--help
> # appreciated.
>
> _arguments -S -s '-F[define input field separator to be an extended regular expression]:extended regular expression:' \
> '*-v[assign values to variables]:assignment:' \
> '(1)-f[program file]:program file:_files' \
> '1:program text:' \
> '*:input files:_files'
[...]
Note that the remaining arguments of awk can also be awk
variable assignments or the special string "-" to specify stdin.
regards,
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author