summaryrefslogtreecommitdiff
path: root/lib/Term
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-23 12:16:47 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-23 12:16:47 +0000
commit6d697788dfbbf5dba78216c0da10ca1dce806bbe (patch)
tree920f5772c534bbad190cb5dae2b33a6238ad8715 /lib/Term
parentd5d9880cc2523c10f7be68257f4f1768a4e552d9 (diff)
downloadperl-6d697788dfbbf5dba78216c0da10ca1dce806bbe.tar.gz
Miscellaneous MacOS Classic library updates from Matthias Neeracher.
p4raw-id: //depot/perl@7412
Diffstat (limited to 'lib/Term')
-rw-r--r--lib/Term/ReadLine.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm
index 8bb820578a..fc78d7b6fa 100644
--- a/lib/Term/ReadLine.pm
+++ b/lib/Term/ReadLine.pm
@@ -169,12 +169,14 @@ sub ReadLine {'Term::ReadLine::Stub'}
sub readline {
my $self = shift;
my ($in,$out,$str) = @$self;
- print $out $rl_term_set[0], shift, $rl_term_set[1], $rl_term_set[2];
+ my $prompt = shift;
+ print $out $rl_term_set[0], $prompt, $rl_term_set[1], $rl_term_set[2];
$self->register_Tk
if not $Term::ReadLine::registered and $Term::ReadLine::toloop
and defined &Tk::DoOneEvent;
#$str = scalar <$in>;
$str = $self->get_line;
+ $str =~ s/^\s*\Q$prompt\E// if ($^O eq 'MacOS');
print $out $rl_term_set[3];
# bug in 5.000: chomping empty string creats length -1:
chomp $str if defined $str;
@@ -185,7 +187,9 @@ sub addhistory {}
sub findConsole {
my $console;
- if (-e "/dev/tty") {
+ if ($^O eq 'MacOS') {
+ $console = "Dev:Console";
+ } elsif (-e "/dev/tty") {
$console = "/dev/tty";
} elsif (-e "con" or $^O eq 'MSWin32') {
$console = "con";