On Sun, Jul 26, 2009 at 11:34 AM, Efraim Yawitz<[email protected]> wrote:
>
>
> On Sun, Jul 26, 2009 at 6:20 PM, Gregory Margo <[email protected]> wrote:
>>
>> No.  Shells in general (bash,dash,ksh,zsh,tcsh,csh) allow complete
>> removal of the environment variable.  Bourne-type shells use "unset"
>> and C-type shells use "unsetenv" commands.
>>
> OK, but why is that necessary?

For programs that have different behavior depending on whether or not
a given environment variable exists - there are a great many programs
that fall into this category.  For instance...

$ export PAGER='echo hello'
$ man man
hello
$ PAGER=
$ man man
<... implicitly paged as though by 'cat' ...>
$ unset PAGER
$ man man
<... implicitly paged through 'more' ...>

So, you get different behavior for a non-empty environment variable,
an empty environment variable, and no environment variable.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to