Set $IFS in C++

This was done in share/config.fish, but leads to surprising results if
that isn't read - e.g. because someone just built fish in the git
directory to test it without installing.

It's also not something that is any more or less complicated.

For compatibility, keep it in config.fish as well for the time being.
This commit is contained in:
Fabian Homborg 2018-05-03 12:49:21 +02:00
parent 2a616698b3
commit b0368fd85b

View File

@ -924,6 +924,9 @@ void env_init(const struct config_paths_t *paths /* or NULL */) {
uid_t uid = getuid();
setup_user(uid == 0);
// Set up $IFS - this used to be in share/config.fish, but really breaks if it isn't done.
env_set_one(L"IFS", ENV_GLOBAL, L"\n \t");
// Set up the version variable.
wcstring version = str2wcstring(get_fish_version());
env_set_one(L"version", ENV_GLOBAL, version);