mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Make universal variables cache the path to the variable file
This commit is contained in:
parent
32c0afe5a9
commit
330e996c30
1 changed files with 7 additions and 1 deletions
|
@ -67,7 +67,7 @@
|
|||
static wcstring fishd_get_config();
|
||||
static std::string get_variables_file_path(const std::string &dir, const std::string &identifier);
|
||||
|
||||
static wcstring default_vars_path()
|
||||
static wcstring default_vars_path_uncached()
|
||||
{
|
||||
wcstring wdir = fishd_get_config();
|
||||
const std::string dir = wcs2string(wdir);
|
||||
|
@ -79,6 +79,12 @@ static wcstring default_vars_path()
|
|||
return str2wcstring(machine_id_path);
|
||||
}
|
||||
|
||||
static const wcstring &default_vars_path()
|
||||
{
|
||||
static wcstring cached_result = default_vars_path_uncached();
|
||||
return cached_result;
|
||||
}
|
||||
|
||||
/**
|
||||
Test if the message msg contains the command cmd
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue