mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +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 *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();
|
wcstring_list_t vals = var->as_list();
|
||||||
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,%ls with %d elements\n"), var_name,
|
||||||
scope_name, exportv, vals.size());
|
scope_name, exportv, pathvarv, vals.size());
|
||||||
|
|
||||||
for (size_t i = 0; i < vals.size(); i++) {
|
for (size_t i = 0; i < vals.size(); i++) {
|
||||||
if (vals.size() > 100) {
|
if (vals.size() > 100) {
|
||||||
|
|
|
@ -635,4 +635,9 @@ set -ql history
|
||||||
echo $status
|
echo $status
|
||||||
#CHECK: 1
|
#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
|
true
|
||||||
|
|
Loading…
Reference in a new issue