Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Update _twisted completion
- X-seq: zsh-workers 31028
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Update _twisted completion
- Date: Tue, 05 Feb 2013 11:05:27 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1360058728; bh=VyAX+K8azcSIzFkoLobMeWZR6rdwoj86v4DcBQ1Q+Jk=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:Received:Received:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=W42S7oIpCwI/G/nk0XGf2tNmPBUSJDCA1N6f6eiuFHgryzPstAe/Rllp1kzp8dSSwtJTMI9qPDjvb+6thTYxY7uC3CZS6MKdgqUOPrYSfnVWBdhFDKlHPZNkm/d4yeLsPSl6Ro7sDkCvacvfnO1ahAqdAxCBZAQTktj3nebmxLY=
- In-reply-to: <20130204042609.GA1571@redoubt.spodhuis.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: <20130203175328.GL2279@ragnarok.teratorn.org> <20130204042609.GA1571@redoubt.spodhuis.org>
Phil Pennock wrote:
> Wait what, a function to be eval'd, so can do anything in the shell
> environment, which runs because I press tab when seeing what options
> this "command the user is not familiar with" might offer?
I don't think it is much worse than what the current _twisted does.
And in the end you have little choice than to trust all the software
you install and use on your system.
It'd be better if the packaging for Linux distributions (or BSD, opencsw
etc) coordinated things so that completion functions that aren't
distributed with zsh can go in somewhere suitable
(/usr/share/zsh/site-functions or /etc/zsh_completion.d) and then
get checked by compaudit.
I'm not especially familiar with twisted but in general, if the
completion function is going to be calling binaries to generate matches,
it is better to produce lists of things like sub-commands, options, etc
than a full completion function. These can then be used by any shell.
Another comment on _twisted is that using echo for error messages in
completion functions tends not to work too well because it mucks up
the line editor. `zle -M' or simply printing nothing (but generating no
matches) work better.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author