How do I do tab completion in Perl's Term::Shell? -
I am using the package in Perl to implement a CLI tool. I am not able to complete the tabs of a Command Partition with it.
comp_CMD () - which is the API provided by this term :: shell, is to complete the tab. Is not it helping me? Does anyone know the way to do this work ??
Sample code:
#! / Usr / bin / env perl package sample; Use base qw (period :: shell); Sub-prompt_str {"sample \ & gt;" }; Sub comp_show {my $ o = shift; My $ word = shift; $ O- & gt; Conclusion ($ word, [qw (all work and no play is no fun)]; } Sub-run_show {print "run show \ n"; } Package Head; Sample- & gt; New- & gt; Cmdloop;
This program has a run:
sample & gt; Show [TAB]
Do not have the above command Give the expected output .. It only gives me a tab.
Be sure that you have installed or installed.
Comments
Post a Comment