Skip to content

Unexpected history behavior #48

@jdewaen

Description

@jdewaen

I have found a few scenarios in which the history (using the up/down arrow keys) does not behave like in most other shells. These can be reproduced from the demo shell as described in the readme.

Scenario 1:
From an empty shell with no history

  1. Enter a command, press enter
  2. Press the up arrow - The command you entered above will show up as expected
  3. Press enter
  4. Press the up arrow - The command does not show up. This is unexpected. In most shells you can press the up arrow and enter repeatedly to keep executing the same command over and over again

Scenario 2:
From an empty shell with no history

  1. Enter a first command, press enter
  2. Enter a second (different) command, press enter
  3. Press the up arrow - The second command appears as expected
  4. Press backspace until the command line is empty again
  5. Press enter - Empty command --> the prompt simply appears again as expected
  6. Press the up arrow - The first command appears. This is unexpected. In most shells the the history cursor will reset back to the most recent entry even after submitting an empty command.

The second scenario could be up for discussion, but the first one definitely seems like a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions