hotshot has asked for the wisdom of the Perl Monks concerning the following question:
My problem is that my prompt is built like a tree, a user can get down on the tree and his promp is changes accordingly, for example:my $term = new Term::ReadLine 'Command Line Interface'; my $attribs = $term->Attribs; $attribs->{completion_entry_function} = $attribs->{'list_completion_fu +nction'}; $attribs->{completion_word} = \@commands; # array of supported comma +nds
The thing is that the array of words to be completed is containg (at the moment) all the commands that can be typed in my shell, no matter what menu the user is in, so pressing tab twice on any menu will give the list of all word in the array and not only the relevant for each menu.Main> Main> nfs # user enters the nfs menu Main/NFS> # new prompt
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Tab completion in a shell
by Aristotle (Chancellor) on Sep 19, 2002 at 19:49 UTC | |
Re: Tab completion in a shell
by zengargoyle (Deacon) on Sep 21, 2002 at 21:07 UTC |