LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-21-2017, 06:54 PM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Taming the `man' command


I know there's a way to bypass the behavior of man where it presents the list of matching keywords and forces you to enter the section you want. I've done this by adding to /etc/bash.bashrc.local the line: "export MAN_POSIXLY_CORRECT=1". This eliminates having to specify any section number, but when you finish reading the given man page, the list of matching keywords is still displayed. (For me this works out fine as 99.999% of the time what I want is in section 1.)

Is there a way to eliminate that list of keywords altogether? (To make man work like it originally did.)

TIA...

--
Rick
 
Old 04-22-2017, 08:42 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
What do you mean by "like it originally did"?

As an aside, I use apropos to find relevant man pages.
 
Old 04-23-2017, 01:45 AM   #3
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by frankbell View Post
What do you mean by "like it originally did"?

As an aside, I use apropos to find relevant man pages.
Exactly. In the commercial versions of UNIX I've used and earlier versions of Linux, "man topic" didn't do the extensive search and provide a list of additional sections where "topic" was listed. "man" would find the first one and display it. No additional user interaction was required. "export MAN_POSIXLY_CORRECT=something" eliminates you having to do additional text entry, goes ahead and displays the first matching page, but, after viewing the manpage, "man" still displays the silly list. THAT's the part I'm looking to eliminate. "man" tries in a sort of half-baked way to be "man+a subset of apropos".

Example of what I've talking about:
Code:
$ export MAN_POSIXLY_CORRECT=1
$ man man
[man displays the man(1) manpage]
Man: find all matching manual pages  <-- With that variable exported, none 
 * man (1)                           <-- of these lines need to be displayed.
   man (7)                           <-- How does one
   man (1p)                          <-- prevent them from appearing?
Other than exporting that shell variable -- which only half fixes the issue -- I can find no other information on how to fix the remaining half. The current "man" behavior is just broken.
 
Old 04-23-2017, 02:27 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Anything of interest from "alias" ?.
 
Old 04-23-2017, 02:49 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
is this a redhat specific thing?
because on my systems (archlinux, debian stable) man behaves in the desired way, without me having to add anything.
 
Old 04-23-2017, 02:57 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Never seen such that I recall - and I'm typing this on F25.
 
Old 04-23-2017, 01:39 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by syg00 View Post
Anything of interest from "alias" ?.
That might be "man"-related? No.
 
Old 04-23-2017, 01:47 PM   #8
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by ondoho View Post
is this a redhat specific thing?
because on my systems (archlinux, debian stable) man behaves in the desired way, without me having to add anything.
You may be onto to something... I'm seeing this on OpenSUSE. I don't have any other distributions online at the moment--except for a really, really, old version of RedHat--that I can check at the moment.

If nobody's seeing this happen on non-OpenSUSE distributions, am I able to move this over to the SUSE/OpenSUSE forum? Or is that action reserved for a moderator?
 
Old 04-23-2017, 02:15 PM   #9
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Apparently this was a change made with OpenSuse 11.1 according to the release notes.

I have never seen this behavior in my own distro(s) of choice, Slackware and FreeBSD, and have been unable to reproduce it...
 
Old 04-24-2017, 10:13 AM   #10
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by astrogeek View Post
Apparently this was a change made with OpenSuse 11.1 ...

I have never seen this behavior in my own distro(s) of choice, Slackware and FreeBSD, and have been unable to reproduce it...
Thanks for that info. I use OpenSUSE is at home and I know it's been the way man has been working for me for some time---and getting increasingly annoying during those times when I'm not running X (with xman conveniently available on the panel). I'd never seen it on the RH or CentOS boxes at work but nobody could remember doing anything to alter the way man worked when they built the system images.

It's been quite a while since I loaded the source code for anything other than the kernel. I'll take a look at man's sources and see how gnarly it would be to make a change.

Again... thanks.

(I'm going to call this one 'solved'.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] man pages - man command phillyfilly Linux - Newbie 4 02-10-2014 05:41 AM
LXer: Taming Twitter with the Command Line LXer Syndicated Linux News 0 08-14-2009 06:00 PM
taming python's interpreter 'help()' command southsibling Programming 7 06-04-2005 06:58 PM
How do i get out of the man command? caa1980 Linux - Software 4 08-13-2004 09:12 PM
Newbie needs help with man command isolationist Linux - General 4 02-16-2003 12:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration