Skip to content

Implement Command HistoryΒ #55

Description

@Koloss0

πŸ—’οΈ Task Description

Summary
The SOTI CLI does not yet support re-running previous commands the user has sent. Every time the user enters a command, it should get saved in an internal command history list. The user should then be able to re-run commands using this history.

Details
It's up to you how the command history should be accessed from the command prompt. I think the most user friendly approach would be to use the Up/Down arrow keys to flip through previous commands. However, this may require overriding some of Urwid's default functionality because that's normally used to navigate the UI (i.e. switch panels). So, the alternative is to use some kind of key sequence like Ctrl+P for previous and Ctrl+N for next. Either of these implementations would work.

βœ… Completion Criteria

  • The user is able to flip through the command history and re-run previously sent commands
  • No bugs are present

πŸ“‚ Affected Components

  • Affected files:
    • main_screen.py: You may (or may not!) have to change this file
    • widgets.py: You will probably have to edit the CommandPrompt class to implement flipping through commands

🚧 Notes / Reference

  • The SOTI CLI is implemented using a Python library called Urwid. This library simplified the creation of fancy UI elements like buttons, panels, text boxes, etc. in the terminal. You will most likely need to work with the Urwid API to get this working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions