diff options
author | Ryan Chandler <ryangjchandler@gmail.com> | 2022-02-21 21:41:25 +0000 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-02-22 21:26:25 +0330 |
commit | 05cdfb8698411726285c9c524051fcf0ed3598a0 (patch) | |
tree | d99f2e7d84ed85ebe881bb3243bed0122ab6ac20 /Userland/Shell | |
parent | 8fe20232e8506eda3fed3fd1e5360884d1280777 (diff) | |
download | serenity-05cdfb8698411726285c9c524051fcf0ed3598a0.zip |
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.
Diffstat (limited to 'Userland/Shell')
-rw-r--r-- | Userland/Shell/Builtin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Shell/Builtin.cpp b/Userland/Shell/Builtin.cpp index da1843da85..7e0888bf5f 100644 --- a/Userland/Shell/Builtin.cpp +++ b/Userland/Shell/Builtin.cpp @@ -628,7 +628,7 @@ int Shell::builtin_disown(int argc, const char** argv) int Shell::builtin_history(int, const char**) { 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; } |