diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-02-07 22:01:03 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-02-07 22:01:03 +0000 |
commit | 7c62692d430af7313d52257895cfa8298676b6f6 (patch) | |
tree | e29d1348de49aa33b8423ed2290002e39c7a0d1c /src/option.c | |
parent | f97ca8f0665f4604f7778ea709573d920ab83240 (diff) | |
download | vim-7c62692d430af7313d52257895cfa8298676b6f6.zip |
updated for version 7.0049
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/option.c b/src/option.c index 0c6178d63..ffeaf8644 100644 --- a/src/option.c +++ b/src/option.c @@ -2593,18 +2593,19 @@ set_init_1() /* * Find default value for 'shell' option. + * Don't use it if it is empty. */ - if ((p = mch_getenv((char_u *)"SHELL")) != NULL + if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL) #if defined(MSDOS) || defined(MSWIN) || defined(OS2) # ifdef __EMX__ - || (p = mch_getenv((char_u *)"EMXSHELL")) != NULL + || ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL) # endif - || (p = mch_getenv((char_u *)"COMSPEC")) != NULL + || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL) # ifdef WIN3264 - || (p = default_shell()) != NULL + || ((p = default_shell()) != NULL && *p != NUL) # endif #endif - ) + ) set_string_default("sh", p); #ifdef FEAT_WILDIGN |