command line interface shell -- (name stolen from http://clish.sourceforge.net/)
Perl Perl6 Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib/Term/ReadLine
t
.gitignore
Changes
LICENSE
MANIFEST
MANIFEST.SKIP
Makefile.PL
README.pod
TODO
find-bad-debugs.sh
test-run.sh

README.pod

NAME

Term::ReadLine::CLISH — command line interface shell

SYNOPSIS

This is a bundle of OO interfaces to quickly built shells with tab completion and context help. It is intended to feel like a certain unnamed embedded operating system.

my-shell> ping count 1 size 1300 2001:470:1f10:456:0:56:48:42
PING 2001:470:1f10:456:0:56:48:42(2001:470:1f10:456:0:56:48:42) 1300 data bytes
1308 bytes from 2001:470:1f10:456:0:56:48:42: icmp_seq=1 ttl=64 time=0.047 ms

--- 2001:470:1f10:456:0:56:48:42 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.047/0.047/0.047/0.000 ms

my-shell>

GOALS

CPAN Friendly

To the extent that this can be done, I'd like for this to be CPAN friendly. I'm unsure about the namespace, that's for sure; in fact, it's not really clear CPAN needs more shell-kits (see "OTHERS" below). Ideally, the commands should all be modules, rather than xml files (or whatever). Commands are located as plugins using Module::Pluggable, so they can be installed in the usual Perl places rather than having to find a home for them in /usr/share somewhere.

Moduler Design

Where possible, I'm trying to use modules to make the shell and shell objects fit into home directories correctly. I'm using things like File::HomeDir to do this. In fact, anywhere I can lift something from the CPAN to do things better than I can handroll them, I've been trying to do so. Sometimes this means big refactorings, which is ok with me.

Moose-y

I'm not very good at Moose and if you're seeing things that are being done wrong, feel free to jump in (https://github.com/jettero/clish) and fix them — or maybe just drop me a line: mailto:jettero@cpan.org, irc://chat.freenode.net/jettero,isnic, http://twitter.com/spottedkangaroo.

NAME

I loved the CLISH project, but ultimately didn't want to do this in that way. I wanted Perl, obviously, and didn't want to deal with XML. I don't personally find it human readable (ymmv).

http://clish.sourceforge.net/

I asked the author if he minded, and he did not. We feel the names are sufficiently different that it wouldn't cause any confusion for anyone, and even if it did (he said) it's not trademarked anyway.

OTHERS

I'm reinventing the wheel. There are plenty of other choices out there, but none are what I wanted at all. For a complete working solution full of multi language support look at Term::RouterCLI. I literally couldn't find the documentation for this module, but it seems to be pretty mature.

I also found some other things like Term::UI, Term::ShellKit, Term::Shell, Term::TUI, and even something called Term::ReadLine::Zoid. I haven't really checked these out. I did poke around to see if they were (as RouterCLI calls it) “Stanford style” NLP parsers and whether they were pluggable enough to get what I wanted, but that's about it. Probably one of them would have been a great choice and I missed it. I am cut and pasting heavily from AnyEvent::ReadLine::Gnu (MLEHMANN figured out a lot of stuff).