Bug 145710 - "U" command doesn't work in mail
"U" command doesn't work in mail
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mailx (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-20 14:47 EST by Josh Boyer
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-27 06:05:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to add "U" command (487 bytes, patch)
2005-01-20 18:55 EST, Josh Boyer
no flags Details | Diff

  None (edit)
Description Josh Boyer 2005-01-20 14:47:21 EST
Description of problem:

According to the man page for mail(1):
     unread  (U) Takes a message list and marks each message as not
having been read.

The "unread" command works just fine, but mail does not handle the
shortcut "U" command.

>  40 davej@redhat.com      Thu Jan 20 13:22 121/5409  "Fedora Core 3
Update:"
& U 40
Unknown command: "U"
& unread 40
&


Version-Release number of selected component (if applicable):

mailx-8.1.1-33

How reproducible:

Always

Steps to Reproduce:
1. Open mail
2. Read a message
3. Type "U <num>" where <num> is the number of the email you'd like to
mark as unread
  
Actual results:

Unknown command

Expected results:

Message is marked as unread

Additional info:

I'll try to look into why this is later.
Comment 1 Josh Boyer 2005-01-20 18:53:59 EST
The problem seems to come from the way that isprefix() in lex.c looks
up commands.  It simply compares each character in the parsed word to
the list of command names.  Since there is no command starting with
"U", it fails.

I'll attach a patch that fixes the problem shortly.
Comment 2 Josh Boyer 2005-01-20 18:55:34 EST
Created attachment 110036 [details]
Patch to add "U" command

This patch adds a "U" command, which is essentially a shortcut for unread as
the man page states.

Tested it locally and it works.
Comment 3 Josh Boyer 2005-01-21 22:14:15 EST
I realize folks are busy, but is there any interest in this bug?  I'm
sure it's probably present in FC4/RHEL4 as well.

I'd check the changes into CVS myself, but I don't have a developer
account.
Comment 4 Ivana Varekova 2005-01-24 11:12:39 EST
Thank you for your notices. 
Thanks for the patch. 
The problem was fixed.
Ivana Varekova
Comment 5 Josh Boyer 2005-01-25 10:27:38 EST
Thanks.  Will this be released as an update to FC3, or will it go into
FC4?
Comment 6 Ivana Varekova 2005-01-27 06:05:49 EST
The fixed release is 8.1.1-41.
It will be in FC4.
Thank you for your bug report and patch.
Ivana Varekova

Note You need to log in before you can comment on or make changes to this bug.