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

Feature Suggestion: Left Arrow/Backspace to start edit #1906

Open
rstelzleni opened this issue Mar 27, 2024 · 0 comments · May be fixed by #2000
Open

Feature Suggestion: Left Arrow/Backspace to start edit #1906

rstelzleni opened this issue Mar 27, 2024 · 0 comments · May be fixed by #2000

Comments

@rstelzleni
Copy link

rstelzleni commented Mar 27, 2024

I often mistype commands, and my muscle memory has me hit up arrow, left arrow to start editing it. With atuin this of course doesn't do anything, I need to hit up arrow, tab, left arrow.

Hitting up arrow shows me commands, which is perfect. Hitting left immediately after, with no search, does nothing. My suggestion is, if there is no search and the user presses left, start editing the currently selected command. Basically, left is like tab+left if the search box is empty. I think the same suggestion would make sense for backspace with no search.

I think this would help with people's long entrenched muscle memory, and also be a natural way of working when scrolling back through commands with up arrow. What do you think?

ps, Apologies if this has been suggested. I couldn't find in google or in github search

rwlr added a commit to rwlr/atuin that referenced this issue May 4, 2024
The above keys edit the selected command (as with hitting Tab), but
like if using them in the shell. They only trigger when the search
input is currently empty, and must be enabled individually with
the respective boolean config options:

* exit_with_backspace: right-trim command and remove last character

* exit_with_space: right-trim and append a space character

* exit_with_home: start editing at position 0

* exit_with_cursor_left: right-trim and start editing at last character

* exit_positions_cursor: enable cursor positioning for Home and Left
  keys (bash-only)

Updated bash init to support cursor positioning. For other shells, Home
and Left keys will behave like Tab.

Resolves atuinsh#1906
@rwlr rwlr linked a pull request May 4, 2024 that will close this issue
2 tasks
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 a pull request may close this issue.

1 participant