1 |
|
#!/usr/bin/perl |
2 |
|
## |
3 |
|
## MJAM::Command::Shell -- CommandShell |
4 |
|
## |
5 |
|
## $Id$ |
6 |
|
## |
7 |
|
## $Log$ |
8 |
|
## Revision 1.4 2002/06/15 08:15:50 cvsjoko |
9 |
|
## + bugfixes in ReadKey-behavious for Linux |
10 |
|
## |
11 |
|
## Revision 1.3 2002/06/15 08:10:01 cvsjoko |
12 |
|
## + modifications in Term::ReadKey behaviour |
13 |
|
## + header |
14 |
|
## |
15 |
|
## |
16 |
|
## |
17 |
package MJAM::Command::Shell; |
package MJAM::Command::Shell; |
18 |
|
|
19 |
use strict; |
use strict; |
23 |
use IO::File; |
use IO::File; |
24 |
use POE; |
use POE; |
25 |
use MJAM::main; |
use MJAM::main; |
26 |
|
use Term::ReadKey; |
27 |
|
|
28 |
my @sh_commands_local = qw ( connect sc exit quit help ? ); |
my @sh_commands_local = qw ( connect sc exit quit help ? ); |
29 |
my @sh_commands_remote = qw ( tell bye ); |
my @sh_commands_remote = qw ( tell bye ); |
135 |
#print "lCmd: $cmd", "\n"; |
#print "lCmd: $cmd", "\n"; |
136 |
|
|
137 |
#if ($cmd eq 'quit' || $cmd eq 'exit') { exit; } |
#if ($cmd eq 'quit' || $cmd eq 'exit') { exit; } |
138 |
if ($cmd eq 'quit' || $cmd eq 'exit') { exit; } |
if ($cmd eq 'quit' || $cmd eq 'exit') { |
139 |
|
ReadMode 1; |
140 |
|
exit; |
141 |
|
} |
142 |
|
|
143 |
if ($cmd =~ m/(help|\?)\s*(.*)/) { |
if ($cmd =~ m/(help|\?)\s*(.*)/) { |
144 |
my $helpkey = $2; |
my $helpkey = $2; |
397 |
} |
} |
398 |
|
|
399 |
|
|
|
1; |
|
400 |
|
1; |