Rename fish_universal_variables file to fish_variables

This is to avoid development versions of fish 3.0 freaking out when the
file format is changed. We now have better support for for future universal
variable formats so it's unlikely we'll have to change the file name again.
This commit is contained in:
ridiculousfish
2018-10-21 11:12:11 -07:00
parent 7b5296817a
commit 9690ac5974
2 changed files with 6 additions and 2 deletions

View File

@@ -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`.

View File

@@ -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<wcstring> default_vars_path_directory() {
static maybe_t<wcstring> 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();