Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compadd --
- X-seq: zsh-workers 29858
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: compadd --
- Date: Tue, 25 Oct 2011 09:04:45 -0700
- In-reply-to: <j86h78$rcj$1@dough.gmane.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <j86h78$rcj$1@dough.gmane.org>
On Oct 25, 4:33pm, foudfou wrote:
}
} It looks like '-' and '--' don't have the same effect in compadd.
}
} For example, the following completion function produces "_systemctl_test:compadd:2: bad option: -.":
}
} _systemctl_test()
} {
} compadd -- -.mount boot.mount
} }
}
} Whereas it works well with '-'.
Hmm. This is a relatively new problem; here's zsh 4.2.0:
schaefer[505] compdef _systemctl_test foo
schaefer[506] foo <TAB>
-.mount boot.mount
Here's 4.3.12-dev-1 1.5473:
torch% foo
_systemctl_test:compadd:2: bad option: -.
The problem seems to be that the generic option parser has already
removed the "--" option before bin_compadd is even called, even though
the declaration
BUILTIN("compadd", 0, bin_compadd, 0, -1, 0, NULL, NULL)
says that compadd is going to do all its own option parsing.
This probably affects some other builtins as well.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author