fix console.pl max scroll depth
[spider.git] / cmd / help.pl
index b8e74c06b3997b6bca804de1e638fa94c8dff0c9..cc9eee3a1cf3d32e58d3b090212c373b0614d619 100644 (file)
@@ -7,7 +7,7 @@
 #
 # Copyright (c) 1998 - Dirk Koopman G1TLH
 #
-# $Id$
+#
 #
 
 my ($self, $line) = @_;
@@ -59,7 +59,7 @@ my $in;
 $line =~ s{[^\w/]}{}g;
 $line =~ s{/}{.*/}g;
 $line =~ s/^\s+//g;
-$line =~ s/\s+$//g;
+$line =~ s/[\s\r]+$//g;
 $line = "help" if $line =~ /^\s*$/;
 
 # sort out aliases
@@ -72,6 +72,7 @@ if ($h) {
        foreach $in (<$h>) {
                next if $in =~ /^\#/;
                chomp $in;
+               $in =~ s/\r$//;
                if ($in =~ /^===/) {
                        last if $state == 2;           # come out on next command
                        $in =~ s/=== //;