Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmd history #1

Merged
merged 6 commits into from
Oct 25, 2024
Merged

Cmd history #1

merged 6 commits into from
Oct 25, 2024

Conversation

mcknly
Copy link
Owner

@mcknly mcknly commented Oct 25, 2024

Implement command history with either up/down arrows or ctrl+a/ctrl+z. The control key combos are added because they send only a single byte, whereas up/down arrows send 3 bytes - on some systems the character processing may not be fast enough to digest the full escape codes.

RoStCode and others added 6 commits August 17, 2022 08:24
This implementation works on embedded targets and in the Linux demo
but code is still a bit of 'work in progress'.

Work that remains:
- All examples shall be updated with 'ush_history' struct.
- Implement unit tests for new 'ush_history.c' source file.
- Tweak implementation so behavior is more like Linux shell:
    - Current line is saved when using up/down arrows.
    - Changes to history lines is saved when using up/down arrows.

Work according to 'TODO:' comments in source code:
- Implement autocomplete using history lines in the future.
- Add unit test for state USH_STATE_READ_CHAR_BUFFER.
This implementation works on embedded targets and in the Linux demo
but code is still a bit of 'work in progress'.

Work that remains:
- All examples shall be updated with 'ush_history' struct.
- Implement unit tests for new 'ush_history.c' source file.
- Tweak implementation so behavior is more like Linux shell:
    - Current line is saved when using up/down arrows.
    - Changes to history lines is saved when using up/down arrows.

Work according to 'TODO:' comments in source code:
- Implement autocomplete using history lines in the future.
- Add unit test for state USH_STATE_READ_CHAR_BUFFER.
Unit tests are to be added later.
@mcknly mcknly merged commit 2aae816 into main Oct 25, 2024
@mcknly mcknly deleted the cmd-history branch October 25, 2024 18:39
mcknly added a commit to mcknly/breadboard-os that referenced this pull request Oct 25, 2024
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.

2 participants