summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/Term/ReadLine.pm
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-03-16 20:14:30 +0000
committermarkm <markm@FreeBSD.org>2002-03-16 20:14:30 +0000
commitb878a8b4fc512ca76116a7012802d385208857c3 (patch)
tree40ba760f36cd8e65b8c0a8caeaee00ceb84de622 /contrib/perl5/lib/Term/ReadLine.pm
parent96faff292d8b1b0bfcebddfb2f70f375ad79fec7 (diff)
parent3eac21f49bc763a6c0044b4afbc0c7ece760144f (diff)
downloadFreeBSD-src-b878a8b4fc512ca76116a7012802d385208857c3.zip
FreeBSD-src-b878a8b4fc512ca76116a7012802d385208857c3.tar.gz
This commit was generated by cvs2svn to compensate for changes in r92442,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/perl5/lib/Term/ReadLine.pm')
-rw-r--r--contrib/perl5/lib/Term/ReadLine.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/perl5/lib/Term/ReadLine.pm b/contrib/perl5/lib/Term/ReadLine.pm
index 8bb8205..fc78d7b 100644
--- a/contrib/perl5/lib/Term/ReadLine.pm
+++ b/contrib/perl5/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";
OpenPOWER on IntegriCloud