"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/env.cpp" between
fish-3.0.1.tar.gz and fish-3.0.2.tar.gz

About: fish is a smart and user-friendly interactive command line shell.

env.cpp  (fish-3.0.1):env.cpp  (fish-3.0.2)
skipping to change at line 963 skipping to change at line 963
// so it isn't necessary to warn here as well. // so it isn't necessary to warn here as well.
env_set_empty(L"HOME", ENV_GLOBAL | ENV_EXPORT); env_set_empty(L"HOME", ENV_GLOBAL | ENV_EXPORT);
} }
free(unam_narrow); free(unam_narrow);
} else { } else {
// If $USER is empty as well (which we tried to set above), we can't get $HOME. // If $USER is empty as well (which we tried to set above), we can't get $HOME.
env_set_empty(L"HOME", ENV_GLOBAL | ENV_EXPORT); env_set_empty(L"HOME", ENV_GLOBAL | ENV_EXPORT);
} }
} }
// initialize the PWD variable if necessary // Note we may inherit a virtual PWD that doesn't match what getcwd would re
// Note we may inherit a virtual PWD that doesn't match what getcwd would re turn; respect that
turn; respect that. // if and only if it matches getcwd (#5647). Note we treat PWD as read-only
// Note we treat PWD as read-only so it was not set in vars. so it was not set in
const char *incoming_pwd = getenv("PWD"); // vars.
if (incoming_pwd && incoming_pwd[0]) { const char *incoming_pwd_cstr = getenv("PWD");
env_set_one(L"PWD", ENV_EXPORT | ENV_GLOBAL, str2wcstring(incoming_pwd) wcstring incoming_pwd = incoming_pwd_cstr ? str2wcstring(incoming_pwd_cstr)
); : wcstring{};
if (!incoming_pwd.empty() && paths_are_same_file(incoming_pwd, L".")) {
env_set_one(L"PWD", ENV_EXPORT | ENV_GLOBAL, std::move(incoming_pwd));
} else { } else {
env_set_pwd_from_getcwd(); env_set_pwd_from_getcwd();
} }
env_set_termsize(); // initialize the terminal size variables env_set_termsize(); // initialize the terminal size variables
env_set_read_limit(); // initialize the read_byte_limit env_set_read_limit(); // initialize the read_byte_limit
// Set g_use_posix_spawn. Default to true. // Set g_use_posix_spawn. Default to true.
auto use_posix_spawn = env_get(L"fish_use_posix_spawn"); auto use_posix_spawn = env_get(L"fish_use_posix_spawn");
g_use_posix_spawn = g_use_posix_spawn =
use_posix_spawn.missing_or_empty() ? true : from_string<bool>(use_posix_ spawn->as_string()); use_posix_spawn.missing_or_empty() ? true : from_string<bool>(use_posix_ spawn->as_string());
 End of changes. 1 change blocks. 
8 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)