Date: Sat, 17 Mar 2018 03:46:44 +0300 From: Valery Ushakov <u...@stderr.spb.ru> Message-ID: <20180317004644.gh3...@pony.stderr.spb.ru>
| That reminds me... We currently abuse ENVIRONMENT section to document | variables like PS1 or HISTSIZE which are quite obviously not | environment variables. Actually they are - those two particularly. In principle, essentially all shell variables are (potentially) environment variables - all they need to be is either in the environ when the shell starts, or be the subject of export (or set -a). But it is very common for PS1 and HISTSIZE to be imported from the environment, and exported again - if sh were a true posix shell that would be the normal way for them to be set in all but login shells. But that's how I set that kind of var when I run an xterm - I do "HISTSIZE=nnn PS1='$ ' .... xterm -ut -geom ..." and the HISTSIZE (etc) passed in the env to xterm get passed down to the shell, and set that way. [Different xterms get different settings of course, so the shells run in them get configured differently, to meet the needs of whatever that window is to be used for.] LINENO (which was the subject of an earlier commit) is a trickier case - it can be exported to the environment, but it isn't imported from there (though if it is in the environ of the shell when it starts, it will be exported again - just the value in the environ is ignored.) Having it in the environ is a rare (and not so useful) case. I think most of them should be moved out of | .Sh ENVIRONMENT into a separate .Ss section inside .Sh DESCRIPTION I will leave that to the people who understand the principles of the NetBSD man page layout. | (and the LINENO section should moved into DESCRIPTION as well). That too. The content (text) is what matters more to me, where in the man page it appears, and what kind of markup macros are used is of far less interest. (This also does not imply that I am satisfied with the content of the section, or that the other issues are unimportant.) kre