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

Re: [(I)-foo] subscripting in _git



On Thu, Jul 21, 2011 at 12:32, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> I noticed while looking at _git-add that _git does a lot of this type of thing:
> if (( words[(I)-n|--dry-run] )); then
> that particular example is fine, but further down is this
> if [[ -n ${line[(I)-f|--force]} ]]; then
> which seems to have two problems, first it uses line instead of words,
> so it never matches.

If you check out the latest revision, however, this has been fixed.  I
fixed it an hour or so ago.  The correct pattern when checking for an
option processed by _arguments is if [[ -n ${opt_args[(I)-o|--option]}
]]; then …; fi.

There are, based on my checks, no other instances of the incorrect pattern.



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