Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Fix an annoying apropos glitch' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix an annoying apropos glitch
Authored by: mervTormel on Jan 23, '05 11:31:22AM
you want your less to behave; you want your apropos to behave.


$ alias mank='LESS=-iMsXS~ /usr/bin/apropos'     
what we have here is an alias definition that specifies an environment variable for the life of the following command only.

mank? see man -k

[ Reply to This | # ]
Or, more generally (for bash users)
Authored by: Mulligan on Jan 30, '05 10:56:50AM

You can keep your current LESS settings and only add the -S when running apropos:

alias apropos='LESS=${LESS:--}S /usr/bin/apropos'

The magic is in the variable expansion ${LESS:--} which expands to your current LESS value if you have one and - if not.

[ Reply to This | # ]