Term::ShellUI 0.85 review

Download
by rbytes.net on

Term::ShellUI is a fully-featured shell-like command line environment. SYNOPSIS use Term::ShellUI; my $term = new Term::Sh

License: Perl Artistic License
File size: 42K
Developer: Scott Bronson
0 stars award from rbytes.net

Term::ShellUI is a fully-featured shell-like command line environment.

SYNOPSIS

use Term::ShellUI;
my $term = new Term::ShellUI(
commands => {
"cd" => {
desc => "Change to directory DIR",
maxargs => 1, args => sub { shift->complete_onlydirs(@_); },
proc => sub { chdir($_[0] || $ENV{HOME} || $ENV{LOGDIR}); },
},
"pwd" => {
desc => "Print the current working directory",
maxargs => 0, proc => sub { system('pwd'); },
},
"quit" => {
desc => "Quit using Fileman", maxargs => 0,
method => sub { shift->exit_requested(1); },
}},
history_file => '~/.gdbui-synopsis-history',
);
print 'Using '.$term->{term}->ReadLine."n";
$term->run();

Term::ShellUI uses the history and autocompletion features of Term::ReadLine to present a sophisticated command-line interface to the user. It tries to make every feature that one would expect to see in a fully interactive shell trivial to implement. You simply declare your command set and let ShellUI take care of the heavy lifting.
This module was previously called Term::GDBUI.

Requirements:
Perl

Term::ShellUI 0.85 search tags