|
|
Fix an annoying apropos glitch
This is no fix, sorry. It does not scale (fixed length). What if you change the terminal size?
Where to put the less -S flag
Adding an -S flag after $PAGER is not a good way to do this, because it assumes that PAGER is set to less(1). Consider what would happen if PAGER were set in the environment to some other command, such as "xmessage -file -": if there is an -S flag after $PAGER, the program will simply fail to work.
Where to put the less -S flag
But, it is only set to less if it is undefined. What if you normally have it set to something else, like 'less -ERmX~'?
Where to put the less -S flag
Yeah, it's kind of an endless loop, isn't it?
Well, you could put an "apropos" shim like this into your personal bin directory:
so that the PAGER definition is overridden. I still think the original file
should be changed by adding the -S to its default PAGER definition. (The "xxx" gets replaced with whatever your other less preferences are.)
Greg Shenaut
Fix an annoying apropos glitch
How about using something like:
After some mucking around (using the "apropos" command, appropriately enough) I haven't found a command that can give me this information. Anyone know a way to do this?---
Fix an annoying apropos glitch
Of course this isn't dynamic, but it should work at whatever the terminal width is before 'apropos' is executed. It seems that there is no perfect solution to this problem.
shell width command
I think the -S flag is probably a better way to handle apropos, but you could alternatively use this (possibly somewhat fragile) cut command:
Greg Shenaut
shell width command
Less fragile stty:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|