mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
Ellipsis OCD
This commit is contained in:
@@ -571,9 +571,14 @@ static void show_scope(const wchar_t *var_name, int scope, io_streams_t &streams
|
||||
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());
|
||||
|
||||
for (size_t i = 0; i < vals.size(); i++) {
|
||||
if (vals.size() > 100) {
|
||||
if (i == 50) streams.out.append(L"...\n");
|
||||
if (i == 50) {
|
||||
// try to print a mid-line ellipsis because we are eliding lines not words
|
||||
streams.out.append(get_ellipsis_char() > 256 ? L"\u22EF" : get_ellipsis_str());
|
||||
streams.out.push_back(L'\n');
|
||||
}
|
||||
if (i >= 50 && i < vals.size() - 50) continue;
|
||||
}
|
||||
const wcstring value = vals[i];
|
||||
|
||||
Reference in New Issue
Block a user