Due to the order in commands table, "c" maps to "copy", not "chdir" as
man page says. "cd" and "ch" work instead. Two alternative fixes: either
man page or the order of commands - leaving for you to decide. IMHO
better to update man page than muscle memory of old time users.

Index: mail.1
===================================================================
RCS file: /cvs/src/usr.bin/mail/mail.1,v
retrieving revision 1.70
diff -u -p -r1.70 mail.1
--- mail.1      16 Dec 2014 18:37:17 -0000      1.70
+++ mail.1      3 Jan 2015 20:49:55 -0000
@@ -422,12 +422,14 @@ If the
 command is given with no argument, the current set of alternate
 names is displayed.
 .It Ic chdir
-.Pq Ic c
+.Pf ( Ic ch
+or
+.Ic cd )
 Changes the user's working directory to that specified, if given.
 If
 no directory is given, then changes to the user's login directory.
 .It Ic copy
-.Pq Ic co
+.Pq Ic c
 The
 .Ic copy
 command does the same thing that


Alternatively, keeping man page, but moving copy command down:


Index: cmdtab.c
===================================================================
RCS file: /cvs/src/usr.bin/mail/cmdtab.c,v
retrieving revision 1.13
diff -u -p -r1.13 cmdtab.c
--- cmdtab.c    27 Oct 2009 23:59:40 -0000      1.13
+++ cmdtab.c    3 Jan 2015 20:41:36 -0000
@@ -69,9 +69,9 @@ const struct cmd cmdtab[] = {
        { "unread",     { unread },     MSGLIST,        0,      MMNDEL },
        { "Unread",     { unread },     MSGLIST,        0,      MMNDEL },
        { "!",          { shell },      I|STRLIST,      0,      0 },
-       { "copy",       { copycmd },    M|STRLIST,      0,      0 },
        { "chdir",      { schdir },     M|RAWLIST,      0,      1 },
        { "cd",         { schdir },     M|RAWLIST,      0,      1 },
+       { "copy",       { copycmd },    M|STRLIST,      0,      0 },
        { "save",       { save },       STRLIST,        0,      0 },
        { "source",     { source },     M|RAWLIST,      1,      1 },
        { "set",        { set },        M|RAWLIST,      0,      1000 },

Reply via email to