mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
Shell: Start history counter from 1
Previously would show the list of history items starting from an index of 0. This is a bit misleading though. Running `!0` would actually cause the parser to error out and prevent you from running the command.
This commit is contained in:
parent
8fe20232e8
commit
05cdfb8698
1 changed files with 1 additions and 1 deletions
|
@ -628,7 +628,7 @@ int Shell::builtin_disown(int argc, const char** argv)
|
||||||
int Shell::builtin_history(int, const char**)
|
int Shell::builtin_history(int, const char**)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < m_editor->history().size(); ++i) {
|
for (size_t i = 0; i < m_editor->history().size(); ++i) {
|
||||||
printf("%6zu %s\n", i, m_editor->history()[i].entry.characters());
|
printf("%6zu %s\n", i + 1, m_editor->history()[i].entry.characters());
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue