Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _chmod: use $line[1] instead of $words[2] to access the mode
On Sun, 5 Jan 2014 21:52:56 +0900
"Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> BTW, man zshcompsys says, in the description of _arguments,
>
> During the performance of the action the array `line' will be set to
> the command name and normal arguments from the command line, i.e. the
> words from the command line excluding all options and their arguments.
>
> But it seems $line contains only the 'normal arguments', not including
> the 'command name'.
This is quite hard to verify for sure, since that parameter emerges from
the comparguments builtin in Src/Zle/computil.c after some quite major
engineering works, but it certainly looks plausible indepdendently of
your testing --- my reading is that everything that happens in the code
is associated with arguments that map onto something specified by the
_arguments call, which don't include the command name that triggered
completion. I've submitted a change.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author