Skip to content

Commit

Permalink
mail: trim leading spaces from command input (#800)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
mknos authored Nov 12, 2024
1 parent c67fc0d commit 9cc12e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/mail
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ use File::Temp;
use Getopt::Std;
use vars qw($VERSION $ROWS $BUFFERL $box);

$VERSION="0.02";
$VERSION="0.03";
$ROWS=23; # Screen Dimensions. Yeah, this sucks.
$COLS=80;
$BUFFERL=2; # Lines needed for "fluff"
Expand Down Expand Up @@ -980,6 +980,7 @@ CMDS: {
print "> ";
$cmd=<STDIN>;
chomp $cmd;
$cmd =~ s/\A\s+//;
}
GOTONE: {
if ($cmd=~/^[a-zA-Z]+/) {
Expand Down Expand Up @@ -1202,10 +1203,10 @@ B<u> is an alias for this command.
Mark as unread any specified mail messages.
B<U> is an alias for this command.
=item visal msg
=item visual msg
Invoke the visual editor (specified in $VISUAL, or /usr/bin/vi) on the
indicated messages. Re-read those messages in afer the editing session.
indicated messages. Re-read those messages in after the editing session.
B<v> is an alias for this command.
=item write msg path
Expand Down

0 comments on commit 9cc12e8

Please sign in to comment.