On Friday, March 13, 2015, Chet Ramey <chet.ra...@case.edu> wrote: > On 3/12/15 2:13 PM, Peng Yu wrote: > >>> The -i option obviously works with set. But it is missing in the man > >>> page. Should this be added? > >> > >> No. It's really only there for completeness, so things like `set $-' > >> work as expected without error. > > > > But if something is in the implementation, it should be also in the > > documentation, right? > > There is a level of absurdity about this. I can put a sentence in saying > that the -i, -c, and -s options are only effective at invocation and no-ops > when used with `set' -- if you've ever wondered how you get an 80-page man > `page', that's how -- but would that really have made a difference? It's > only there for convenience, after all, and has no effect.
You can avoid these surprises by making -i just as other options, i.e., working within the shell not just when a shell is started. The document should be complete. Why it matters you have a 8, 80, or 800 manpages? Few people prints it. After all, most people just search it and it is better to make it complete. I believe the best way to make the manpage short is to make the implementation intuitive so that people can derive the behavior in complex cases based on what are described in simpler cases in the manual. With this in mind, one avoids the description of complexes cases in the manual. >> -i is described in the OPTIONS section of the man page, since invocation > >> is the only place using it makes sense. > > > > Not necessarily. See my other example sent recently on the mailing > > list of trying to get COLUMNS. > > With regards to COLUMNS, one doesn't need interactive mode to do that. > There are lots of ways to set COLUMNS to the screen width. It's much more > productive to state your requirements clearly so people can suggest > solutions -- people here are more than happy to help -- than to complain > that the shell isn't satisfying your assumptions. > > Chet > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, ITS, CWRU c...@case.edu <javascript:;> > http://cnswww.cns.cwru.edu/~chet/ > -- Regards, Peng