Bug 428218

Summary: can't search in more
Product: [Fedora] Fedora Reporter: Mikel Ward <mikel>
Component: util-linux-ngAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: jonstanley
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-10 13:02:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikel Ward 2008-01-09 23:52:39 UTC
I can't get searching in more to work.

Try something like
more /usr/share/doc/util-linux-ng-2.13/README<Enter>
/MAILING<Enter>

It gives an error "Pattern not found".

It should go to the line matching "MAILING" (I think it positions the match
three lines from the top by default).

The problem seems to exist for upper or lower case search strings.

It's working OK on a RHEL4 box.

# rpm -qf /bin/more
util-linux-ng-2.13-3.2.fc8

Comment 1 Jon Stanley 2008-01-10 06:31:32 UTC
Reproduced and confirmed with vanilla build of upstream 2.13.1-rc2.

Comment 2 Jon Stanley 2008-01-10 06:46:45 UTC
Also confirmed in upstream git.  

Comment 3 Jon Stanley 2008-01-10 06:56:00 UTC
Reported upstream:

To: util-linux-ng.org
Subject: inability to search in 'more'

The documented search facility of 'more' is broken.  This was reported
to Fedora as https://bugzilla.redhat.com/show_bug.cgi?id=428218 and I
have confirmed that the behavior persists in in a git snapshot as of a
few minutes ago, as well as in 2.13.1-rc2.

Thanks!
-Jon


Comment 4 Jon Stanley 2008-01-10 06:58:42 UTC
For the reporter, I'm sure that you know you can use 'less' in the meantime. 
It's much more full-featured, as well :)

Also changed the component to reflect util-linux-ng

Comment 5 Jon Stanley 2008-01-10 13:02:28 UTC
I have verified that the behavior is as expected.  If instead of MAILING in your
test, you search for CFLAG, you'll find the correct behavior both in Fedora and
upstream, based on the below explanation.  Closing NOTABUG.

Date: Thu, 10 Jan 2008 13:11:37 +0100
From: Karel Zak <kzak>
To: Jon Stanley <jonstanley>
Cc: util-linux-ng.org

On Thu, Jan 10, 2008 at 01:53:15AM -0500, Jon Stanley wrote:
> The documented search facility of 'more' is broken.  This was reported
> to Fedora as https://bugzilla.redhat.com/show_bug.cgi?id=428218 and I
> have confirmed that the behavior persists in in a git snapshot as of a
> few minutes ago, as well as in 2.13.1-rc2.

 IMHO the behaviour is correct. I've tested more(8) on Fedora 7,
 RHEL3.7 and Debian 2.2 and I see the same behaviour everywhere.

 rhbz#428218:

> Try something like
> more /usr/share/doc/util-linux-ng-2.13/README<Enter>
> /MAILING<Enter>
>
> It gives an error "Pattern not found".

 Sure, more(8) doesn't looking for the pattern everywhere in the file
 (unlike less(8)). The search facility works between the current
 position and end of file. The current position is at end of screen.

 BTW, the file more.c is unbelievable unreadable junk...

    Karel

-- 
 Karel Zak  <kzak>


Comment 6 Mikel Ward 2008-01-10 13:11:58 UTC
Thanks for the explanation Karel.

I'm used to more searching the whole page, but quite likely those systems have a
different version of more, or even less pretending to be more.