Bug 181853 - [patch] dot.shrc can't handle command line options in $PAGER variable
Summary: [patch] dot.shrc can't handle command line options in $PAGER variable
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 9.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Eitan Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-06 01:40 UTC by pl
Modified: 2018-01-07 00:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pl 2013-09-06 01:40:00 UTC
/usr/share/skel/dot.shrc, which will end up in $HOME/.shrc contains the following line:

alias m=$PAGER

However this line can't handle optional parameters being used for the pager. For example; this is my PAGER definition in /home/peter/.profile:

PAGER='less -Fe';

Unrelated comment: -e : quit when EOF has been reached a second time; -F : quit when the text can be displayed on one screen.

But as soon as I use this definition it results in an error message after logging on to the system:

alias: -Fe not found

Fix: 

In /usr/share/skel/dot.shrc change:

alias m=$PAGER

into:

alias m="$PAGER"
How-To-Repeat: Edit $HOME/.profile and change:

PAGER=more;     export PAGER

into:

PAGER='less -Fe';     export PAGER
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 06:58:11 UTC
"alias m" has been removed
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 06:59:31 UTC
fixed.
Comment 3 commit-hook freebsd_committer 2017-12-31 06:59:51 UTC
A commit references this bug:

Author: eadler
Date: Sun Dec 31 06:58:58 UTC 2017
New revision: 327420
URL: https://svnweb.freebsd.org/changeset/base/327420

Log:
  skel: Quote PAGER in dot.shrc

  PR:		181853
  Submitted by:	pl@catslair.org
  MFC After:	1 week

Changes:
  head/share/skel/dot.shrc
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:00:06 UTC
Sorry for the spam: I originally was looking at the wrong file. I did actually fix "alias m" to include the quotes.
Comment 5 commit-hook freebsd_committer 2018-01-07 00:32:44 UTC
A commit references this bug:

Author: eadler
Date: Sun Jan  7 00:31:45 UTC 2018
New revision: 327659
URL: https://svnweb.freebsd.org/changeset/base/327659

Log:
  MFC r327420:

  skel: Quote PAGER in dot.shrc

  PR:		181853
  Submitted by:	pl@catslair.org

Changes:
_U  stable/11/
  stable/11/share/skel/dot.shrc