Skip to content

Commit 9cc12e8

Browse files
authored
mail: trim leading spaces from command input (#800)
* For compatibility with OpenBSD mail program, " q" should be interpreted as "q" * While here, fix the name of the "visual" command (aka "v") in the pod manual (entering "visal" does nothing and that is invalid on OpenBSD too)
1 parent c67fc0d commit 9cc12e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/mail

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ use File::Temp;
631631
use Getopt::Std;
632632
use vars qw($VERSION $ROWS $BUFFERL $box);
633633

634-
$VERSION="0.02";
634+
$VERSION="0.03";
635635
$ROWS=23; # Screen Dimensions. Yeah, this sucks.
636636
$COLS=80;
637637
$BUFFERL=2; # Lines needed for "fluff"
@@ -980,6 +980,7 @@ CMDS: {
980980
print "> ";
981981
$cmd=<STDIN>;
982982
chomp $cmd;
983+
$cmd =~ s/\A\s+//;
983984
}
984985
GOTONE: {
985986
if ($cmd=~/^[a-zA-Z]+/) {
@@ -1202,10 +1203,10 @@ B<u> is an alias for this command.
12021203
Mark as unread any specified mail messages.
12031204
B<U> is an alias for this command.
12041205
1205-
=item visal msg
1206+
=item visual msg
12061207
12071208
Invoke the visual editor (specified in $VISUAL, or /usr/bin/vi) on the
1208-
indicated messages. Re-read those messages in afer the editing session.
1209+
indicated messages. Re-read those messages in after the editing session.
12091210
B<v> is an alias for this command.
12101211
12111212
=item write msg path

0 commit comments

Comments
 (0)