Skip to content

Commit

Permalink
Set $IFS in C++
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
faho committed May 3, 2018
1 parent 2a61669 commit b0368fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b0368fd

Please sign in to comment.