Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Update _twisted completion
- X-seq: zsh-workers 31017
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Update _twisted completion
- Date: Sun, 3 Feb 2013 23:26:09 -0500
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201210; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=PdjW0uaI1fz3uO/A6a+IkGGTOD4FWRAt3/csRU3H2Tk=; b=Fi9d7E8u9o4kC5aUfkQdJXw9MZJeXfpng8menmMv7sUYOGvBaUzp0Rd+OBD51IjASaBV0M3hJEmB4heA0W0Qd/TUR+PsnS8DCLsl4bPy0aE62PsT/ZHgb28ojjqMxd5MsVXnCt2XBlIhbZ6c4pmNf7cGxIclA8kaz3yJ85w4baA=;
- In-reply-to: <20130203175328.GL2279@ragnarok.teratorn.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>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20130203175328.GL2279@ragnarok.teratorn.org>
On 2013-02-03 at 12:53 -0500, Eric P. Mangold wrote:
> Twisted ships a large number of commands, and e.g. `twistd' sub-commands are dynamically generated at runtime via plugin loading. As such, a static completion function is innappropriate for Twisted, and would be instantly out of date. So, the stub function just asks Twisted to send it a
> completion function on stdout, which if well formed can be eval'd inside the stub function (_twisted) to produce results.
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?
Is there no way to rationalize the options for expansion down to a
schema with "global options, sub-commands, sub-command options, tags for
known contexts" and have the _twisted function interpret those
accordingly?
There's a difference between running an unknown command and having your
shell execute, in its own context, any evaluable code supplied by that
command because the user hit _tab_, not _enter_.
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author