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

Re: gnu cut completion as wrong as it can be, patch



On Sun, Feb 03, 2008 at 08:22:35AM +0100, Mikael Magnusson wrote:
> Without linewrapping the patch...

This won't apply, with or without -l.

> --- a/Completion/Unix/Command/_cut
> +++ b/Completion/Unix/Command/_cut
> @@ -35,16 +35,17 @@ if _pick_variant gnu="Free Soft" unix --version; then
>    esac
>
>    _arguments \
> -        '(--bytes -b)'{--bytes=,-b}'['$_cut_args[bytes]']' \
> -        '(--characters -c)'{--characters=,-c}'['$_cut_args[characters]']' \
> -        '(--delimiter -d)'{--delimiter=,-d}'['$_cut_args[delimiter]']' \
> -        '(--fields -f)'{--fields=,-f}'['$_cut_args[fields]']' \
> +        '(--bytes -b+)'{--bytes=,-b}'['$_cut_args[bytes]']:list' \
> +        '(--characters -c+)'{--characters=,-c}'['$_cut_args[characters]']:list' \
> +        '(--delimiter -d+)'{--delimiter=,-d}'['$_cut_args[delimiter]']:delimeter' \
> +        '(--fields -f+)'{--fields=,-f}'['$_cut_args[fields]']:list' \
>          '-n['$_cut_args[n]']' \
>          '--complement['$_cut_args[complement]']' \
> -        '(--only-delimited -s)'{--only-delimited=,-s}'['$_cut_args[only-delimited]']' \
> -        '--output-delimiter['$_cut_args[output-delimiter]']' \
> +        '(--only-delimited -s)'{--only-delimited,-s}'['$_cut_args[only-delimited]']' \
> +        '--output-delimiter=['$_cut_args[output-delimiter]']:delimeter' \
>          '--help['$_cut_args[help]']' \
> -        '--version['$_cut_args[version]']'
> +        '--version['$_cut_args[version]']' \
> +        '*:file:_files'
>  else
>    _arguments \
>      '-b[list specifies byte positions]:list:' \

I'm committing this; I'm not sure why you're putting + signs within the
parentheses.

Index: Completion/Unix/Command/_cut
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_cut,v
retrieving revision 1.4
diff -u -r1.4 _cut
--- Completion/Unix/Command/_cut	7 Dec 2007 17:03:32 -0000	1.4
+++ Completion/Unix/Command/_cut	3 Feb 2008 18:05:49 -0000
@@ -42,9 +42,10 @@
         '-n['$_cut_args[n]']' \
         '--complement['$_cut_args[complement]']' \
         '(--only-delimited -s)'{--only-delimited=,-s}'['$_cut_args[only-delimited]']' \
-        '--output-delimiter['$_cut_args[output-delimiter]']' \
+        '--output-delimiter=['$_cut_args[output-delimiter]']' \
         '--help['$_cut_args[help]']' \
-        '--version['$_cut_args[version]']'
+        '--version['$_cut_args[version]']' \
+        '*:file:_files'
 else
   _arguments \
     '-b[list specifies byte positions]:list:' \



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