Skip to content

fix(shell): correctly handle repeated commands in history#188

Open
ksaweryr wants to merge 1 commit into
mentos-team:mainfrom
ksaweryr:fix/shell-history-repeated-command
Open

fix(shell): correctly handle repeated commands in history#188
ksaweryr wants to merge 1 commit into
mentos-team:mainfrom
ksaweryr:fix/shell-history-repeated-command

Conversation

@ksaweryr

@ksaweryr ksaweryr commented Jul 5, 2026

Copy link
Copy Markdown

Description

This PR fixes a bug that causes the history index to have the wrong value if the command that was just executed is identical to the last entry in history. To reproduce:

  1. run ls
  2. run id
  3. use up arrow and run id
  4. use up arrow - the command that gets autofilled should be id but is ls

Related Issues

Changes Made

  • Fixed a bug related to the history feature in shell

Testing Performed

  • Built successfully on Debian 13
  • Tested manually with make qemu
  • Ran test suite with make qemu-test
  • All tests pass

Checklist

  • Code follows project style guidelines
  • Comments added for complex logic
  • Builds without warnings
  • Tested on QEMU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant