mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
set: Show pathvariableness in --show
This commit is contained in:
parent
4eb906c8d8
commit
90b01fd915
2 changed files with 8 additions and 2 deletions
|
@ -579,9 +579,10 @@ static void show_scope(const wchar_t *var_name, int scope, io_streams_t &streams
|
|||
}
|
||||
|
||||
const wchar_t *exportv = var->exports() ? _(L"exported") : _(L"unexported");
|
||||
const wchar_t *pathvarv = var->is_pathvar() ? _(L" a path variable") : L"";
|
||||
wcstring_list_t vals = var->as_list();
|
||||
streams.out.append_format(_(L"$%ls: set in %ls scope, %ls, with %d elements\n"), var_name,
|
||||
scope_name, exportv, vals.size());
|
||||
streams.out.append_format(_(L"$%ls: set in %ls scope, %ls,%ls with %d elements\n"), var_name,
|
||||
scope_name, exportv, pathvarv, vals.size());
|
||||
|
||||
for (size_t i = 0; i < vals.size(); i++) {
|
||||
if (vals.size() > 100) {
|
||||
|
|
|
@ -635,4 +635,9 @@ set -ql history
|
|||
echo $status
|
||||
#CHECK: 1
|
||||
|
||||
set --path newvariable foo
|
||||
set -S newvariable
|
||||
#CHECK: $newvariable: set in global scope, unexported, a path variable with 1 elements
|
||||
#CHECK: $newvariable[1]: |foo|
|
||||
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue