in reply to Tab completion on the command line
Update: expanded.
If you're on Windows, your shell is CMD.EXE and it does support command-line completion, but (1) only for filenames, and (2) only if you enable it in the registry.
If you're on Unix/Linux, your shell may have completion support. Bash uses Tab, Csh uses Esc Esc. Some versions of these take completion heuristic rules in a separate configuration file.
If you ARE writing your own input routine, you'll need to read from the console in an unbuffered way, so that you can see each character typed. When they tab, you decide what else should be simulated as typed. If they tab again, you may have to erase things from the screen with backspaces before typing a replacement. It's painful to write something like this yourself, and it often raises platform-specific bugs. There's no "standard" way of doing key-by-key input in Perl's basic module library.
--
[ e d @ h a l l e y . c c ]
|
|---|