Dongxu Ma > Term-BashTab-0.03 > Term::BashTab

Download:
Term-BashTab-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Term::BashTab - A simple wrapper of ReadLine with bash-like <TAB>

SYNOPSIS ^

  use Term::BashTab;
  
  my $term = Term::BashTab->new();
  print $term->readline("blah");

  then <TAB> blah <TAB> blah <TAB> ...

DESCRIPTION ^

A simple wrapper of Term::ReadLine, offerring bash-like <TAB> feature.

WHEN TO USE

In order to get a valid program path or directory from user's input. User can use <TAB> to auto-complete.

HOW TO CONFIGURE

The module can parse two modes of input line: command <ONE ENTIRE PATH> and <ONE ENTIRE PATH>

In the first mode, all commands/subs available to user is specified by @Term::BashTab::COMMAND, local it to set your own list.

The second mode is enabled once $Term::BashTab::FIRST_NOT_COMMAND is true. Local it when required somewhere. In this mode, the current input line will be treated as ONE path.

Still not clear enough? Try playing with it in your free time ;-)

WHAT TO RETURN

The same as Term::ReadLine, readline invokes Term::ReadLine::readline at last and returns the result.

EXPORT

The same as Term::ReadLine.

SEE ALSO ^

Term::ReadLine

AUTHOR ^

Dongxu Ma, <dongxu.ma@gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2006 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: