[resend - message got rejected somewhere]
> > (note: I think https://stackoverflow.com/q/1780483/ says that these > > variables > > should be set "locally" only, but > > it doesn't explain why.) > > I didn't get from that article that LINES _should_ not be exported, > just that it wasn't. > > This never made sense to me. Several programs use LINES and COLUMNS > to know how large a display they have to work with, so I would think > that they would always be exported. Many years ago, I put the > following in my ~/.bashrc and haven't had any related problems > since. > > export LINES > export COLUMNS > shopt -s checkwinsize In processes there is a separate space for environment variables. Unfortunately, shells have messed this up by throwing environment variables and shell variables into the same namespace. Then using the "export" mechanism to change what variables mean. And there is no simple way to check if a variable is exported or not. You can use: declare -p LINES Which then has the mysterious output: declare -x LINES="100" Apparently the "-x" indicates the variable is exported. The bash manual page doesn't mention whether LINES is exported or not... The "-i" argument to bash is poorly documented. It says it means "interactive", but then what "interactive" means is spread out in the manual page. I guess that omitting "-i", thus a non-interactive shell, doesn't use SIGWINCH. Searching for "SIGWINCH" indeed finds this in the manual page (it's very hard to find unless you know what to search for). -- FATHER: Make sure the Prince doesn't leave this room until I come and get him. FIRST GUARD: Not ... to leave the room ... even if you come and get him. FATHER: No. Until I come and get him. SECOND GUARD: Hic. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20230322164149.6DBB51C0932%40moolenaar.net.
