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

Support command-line editing #35

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Support command-line editing #35

merged 1 commit into from
Jul 31, 2024

Conversation

ianthomas23
Copy link
Member

This adds support for editing within the input command line:

  1. Left and right arrows to move cursor one character at a time.
  2. Insert new character at cursor position rather that always at the end.
  3. Delete at cursor position to accompany backspace which is already implemented.
  4. Home and End to move cursor to start and end of command line.
  5. Shift/alt left and right arrows to move back and forward a word (separated by whitespace) at a time.
  6. Tab completion at the cursor location whilst keeping the remainder of the command line.

I have been a bit permissive about what keystrokes correspond to these, to ensure that this works on both of my test machines (linux and macos). In time we may need to tighten this up and make some OS-specific. This will need multi-platform testing, both manual and automated.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Jul 31, 2024
@ianthomas23 ianthomas23 merged commit e1213eb into main Jul 31, 2024
4 checks passed
@ianthomas23 ianthomas23 deleted the cmd-line-edit branch July 31, 2024 14:53
ianthomas23 added a commit that referenced this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant