mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
fix set --show
of semi-empty var
A semi-empty var is one with a single empty string element. The `env_var_t::empty()` method returns true for such vars but we want `set --show` to report that it has a single empty element.
This commit is contained in:
parent
64eaf7ca5a
commit
dbb07bc3f5
1 changed files with 1 additions and 1 deletions
|
@ -330,7 +330,7 @@ static void show_scope(const wchar_t *var_name, int scope, io_streams_t &streams
|
||||||
|
|
||||||
const env_var_t var = env_get_string(var_name, scope | ENV_USER);
|
const env_var_t var = env_get_string(var_name, scope | ENV_USER);
|
||||||
wcstring_list_t result;
|
wcstring_list_t result;
|
||||||
if (!var.empty()) tokenize_variable_array(var, result);
|
tokenize_variable_array(var, result);
|
||||||
|
|
||||||
streams.out.append_format(_(L"$%ls: set in %ls scope, %ls, with %d elements\n"), var_name,
|
streams.out.append_format(_(L"$%ls: set in %ls scope, %ls, with %d elements\n"), var_name,
|
||||||
scope_name, exportv, result.size());
|
scope_name, exportv, result.size());
|
||||||
|
|
Loading…
Reference in a new issue