[IPython-user] Hierarchical TAB completion?
Tue Apr 3 17:01:48 CDT 2007
On 4/3/07, Ville M. Vainio <email@example.com> wrote:
> On 4/3/07, Pierre Bielmann <firstname.lastname@example.org> wrote:
> > Hi all,
> > Is it possible to implement (with iPython) a shell which behaves like a
> > classical
> > Router Command Line Shell (e.g. Cisco IOS shell, etc.)? I'd like to
> > objects in a hierachical
> > fashion and execute commands/methods and also have command line
> > only in that context
> > (and not globally). Here is a simple example of what I have in mind:
> Perhaps you could hook a completer method of your state-aware object
> as a re_key = '.*' (match all), so it would be "tried" for every
> command line. It would just see that it's currently in state 'user',
> and return appropriate completions.
> I.e. you have only one completer function, which just behaves
> differently depending on the state. Granted that it's not the most
> elegant solution.
> Ville M. Vainio - vivainio.googlepages.com
> blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
thanks for the input. I was thinking along the same line but hoping for some
other idea. :-)
I'll take a look at it and see if this works out.
Pierre Bielmann <email@example.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user