mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
Redesign new environment variables to use env_var_t instead of wcstring
Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
This commit is contained in:
7
exec.cpp
7
exec.cpp
@@ -1740,16 +1740,15 @@ int exec_subshell( const wchar_t *cmd,
|
||||
int prev_subshell = is_subshell;
|
||||
int status, prev_status;
|
||||
io_data_t *io_buffer;
|
||||
const wchar_t *ifs;
|
||||
char sep=0;
|
||||
|
||||
CHECK( cmd, -1 );
|
||||
// ifs = env_get(L"IFS");
|
||||
ifs = env_get_string(L"IFS").empty()?NULL:env_get_string(L"IFS").c_str();
|
||||
const env_var_t ifs = env_get_string(L"IFS").empty()?NULL:env_get_string(L"IFS").c_str();
|
||||
|
||||
if( ifs && ifs[0] )
|
||||
if( ! ifs.missing_or_empty() )
|
||||
{
|
||||
if( ifs[0] < 128 )
|
||||
if( ifs.at(0) < 128 )
|
||||
{
|
||||
sep = '\n';//ifs[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user