mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 02:02:44 +08:00
fix set --show
output
I realized I was printing individual var entries using zero based indexing (like C++) when the indexes should be one based.
This commit is contained in:
parent
2b2057a56b
commit
ff09b8c1ee
|
@ -342,7 +342,7 @@ static void show_scope(const wchar_t *var_name, int scope, io_streams_t &streams
|
|||
const wcstring value = result[i];
|
||||
const wcstring escaped_val =
|
||||
escape_string(value.c_str(), ESCAPE_NO_QUOTED, STRING_STYLE_SCRIPT);
|
||||
streams.out.append_format(_(L"$%ls[%d]: length=%d value=|%ls|\n"), var_name, i,
|
||||
streams.out.append_format(_(L"$%ls[%d]: length=%d value=|%ls|\n"), var_name, i + 1,
|
||||
value.size(), escaped_val.c_str());
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user