diff --git a/CHANGELOG.md b/CHANGELOG.md index a2b0e7c00..b9260e29d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ fish 3.0 is a major release which brings with it both improvements in functional - `while` sets `$status` to a more useful value (#4982) - Command substitution output is now limited to 10 MB by default (#3822). - The machine hostname, where available, is now exposed as `$hostname` which is now a reserved variable. This drops the dependency on the `hostname` executable (#4422). -- The universal variables file no longer contains the MAC address. It is now at the fixed location `.config/fish/fish_universal_variables` (#1912). +- The universal variables file no longer contains the MAC address. It is now at the fixed location `.config/fish/fish_variables` (#1912). - Bare `bind` invocations in config.fish now work. The `fish_user_key_bindings` function is no longer necessary, but will still be executed if it exists (#5191). - `$fish_pid` and `$last_pid` are available as an alternatives to `%self` and `%last`. diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp index 517a276ff..2797268f9 100644 --- a/src/env_universal_common.cpp +++ b/src/env_universal_common.cpp @@ -93,6 +93,10 @@ static wcstring get_machine_identifier(); /// return a list of paths where the uvars file has been historically stored. static wcstring_list_t get_legacy_paths(const wcstring &wdir) { wcstring_list_t result; + // A path used during fish 3.0 development. + result.push_back(wdir + L"/fish_universal_variables"); + + // Paths used in 2.x. result.push_back(wdir + L"/fishd." + get_machine_identifier()); wcstring hostname_id; if (get_hostname_identifier(hostname_id)) { @@ -109,7 +113,7 @@ static maybe_t default_vars_path_directory() { static maybe_t default_vars_path() { if (auto path = default_vars_path_directory()) { - path->append(L"/fish_universal_variables"); + path->append(L"/fish_variables"); return path; } return none();