Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192342 - app-shells/tcsh needs to change PAGER variable
Summary: app-shells/tcsh needs to change PAGER variable
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-12 19:04 UTC by Juan
Modified: 2007-09-13 08:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan 2007-09-12 19:04:58 UTC
The file:
/etc/csh.env

sets: 
setenv PAGER '/usr/bin/less'

so that the search in less is case insensitive.  This can be annoying when the command names in man pages have capital or mixed case letters.

Unsetting "PAGER" fixes the problem, as well as using "less -i".

Please make either of these changes.
Comment 1 Juan 2007-09-12 19:07:00 UTC
Of course I meant that "less" is currently being case sensitive.  Being case insensitive is preferred.
Comment 2 Arthur Hagen 2007-09-13 06:06:31 UTC
The case insensitivity of less isn't dictated by the PAGER environment variable, but you can set it in the LESS environment variable if you use LESS as the pager.

There are reasons why you shouldn't assume case insensitivity.

Historically, the programs "mail" and "Mail" are often different, and on systems where both are installed, may even have different man pages.
Similar for "head" and "HEAD" which are very different programs, and makefile/Makefile, and finally .z (pack) and .Z (compress) extensions.

Linux is not Windows, and should not try to adjust to the case insensitive world of Windows users.  If man pages list a command with the wrong case, that should be fixed in the man page.

That said, I agree that it's wrong to set PAGER (and VISUAL and EDITOR, for that matter) in a global env file.  They do have default fallbacks, and users who don't agree with the defaults can set the variables to whatever they like.

In your case, if you want less to be case sensitive, add "setenv LESS '-i'" to your ~/.cshrc (or add it to the LESS setting in /etc/csh.env)
Comment 3 Fabian Groffen gentoo-dev 2007-09-13 08:19:08 UTC
The setting of PAGER or LESS, or whatever from csh.env is not a tcsh-specific problem, the same happens for any shell that reads the environment settings from portage.

Editting csh.env is a bad thing, it is generated.

csh.env is sourced early in the process, only for login shells, meaning their settings can be overridden by any configuration lateron without a problem.  They /are/ defaults/fallbacks.

I believe the solution to your problem is to either unsetenv PAGER in your .tcshrc or set LESS env variable accordingly to get the behaviour you want.