From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: zsh-workers@zsh.org
Subject: Re: Update _twisted completion
Date: Sun, 3 Feb 2013 23:26:09 -0500 [thread overview]
Message-ID: <20130204042609.GA1571@redoubt.spodhuis.org> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2013-02-04 4:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 17:53 Eric P. Mangold
2013-02-04 4:26 ` Phil Pennock [this message]
2013-02-04 16:48 ` Eric P. Mangold
2013-02-04 17:17 ` Peter Stephenson
2013-02-04 17:31 ` Phil Pennock
2013-02-04 19:01 ` Eric P. Mangold
2013-02-04 19:11 ` Phil Pennock
2013-02-04 18:38 ` Bart Schaefer
2013-02-05 10:05 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130204042609.GA1571@redoubt.spodhuis.org \
--to=zsh-workers+phil.pennock@spodhuis.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).