-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Disabling the up-arrow key rebinding? #51
Comments
Edit for googlers: This is now really easy! Checkout the docs: https://atuin.sh/docs/key-binding#disable-up-arrow I'd like to suggest you consider getting used to it though. It's possible to use a different filter mode with the up arrow - personally, I use the up arrow to filter searches for the directory, while ctrl-r searches globally. Unfortunately at the moment it'll be a bit awkward. This is definitely something I'd like to change though! What shell do you use? You'll basically need to rebind whatever your original history search widget was, after running the Atuin init command If ZSH, something like this should work:
and if you're using oh-my-zsh, this
I think for Bash you'd be good doing something like this, though I don't use Bash very much so I'm not 100% sure
Ideally I'd like this to be configurable in the Atuin config file, or at the very least with environment variables! I'll see if I can sort that soon |
For anyone looking at this before fixes in the future, I've saved the output of bindkey '^[[A' _atuin_search_widget
bindkey '^[OA' _atuin_search_widget This seems to work pretty perfectly for me. If you don't want to use sheldon, you could do something like:
|
No new files, simpler version thanks to #62: ATUIN_NOBIND=t antibody bundle ellie/atuin # Could be any zsh plugin loader or atuin init
bindkey '^[[A' history-substring-search-up
bindkey '^r' _atuin_search_widget |
Just an FYI, since this issue still turns up first on web search when looking to disable the up arrow, for anyone looking to do this, the key binding doc (updated location) https://atuin.sh/docs/key-binding has proper recipes for setting this up in |
@lhl Thank you so much for mentioning this! |
Figured this is still a part of the question, but when using
(atuin 12.0.0) I've tried |
Above has changed (now a dead link), new location in the web: https://atuin.sh/docs/config/key-binding EDIT: config change from |
official support, in |
This is just terrible UX if you want to quickly fire up the previous command again. Only bind atuin to Ctrl+r instead. refs: atuinsh/atuin#798 refs: atuinsh/atuin#358 refs: atuinsh/atuin#51
This link is a 404 |
There's a page on our docs all about key bindings: https://atuin.sh/docs |
I've updated my comment to the new doc location in case people don't make it down here... |
Tip for those finding this on Google: if you would like to select a command without running it (similar to the default behaviour of the up arrow in the shell), then press the tab key. |
The tab for enter thing was driving me mad, I had no idea how to edit the commands atuin was showing me, just rerun them. I was very close to uninstalling. the grayed out top keystrokes should be less grayed out and at the bottom where the users' eyes are. (imo) |
Funnily enough, before we added that, people said the same thing about the opposite behaviour 🤣 Was this issue how you found out about it? I've tried to put the "tab to edit, enter to exec" thing everywhere, but still get a tonne of people missing it. Do you have any suggestions as the where else it could go? |
Fwiw it's currently
Maybe a popup on first use too? |
I found out via the issue, and I'm not surprised it's contentious. :) I was just searching trying to figure out how to edit a command, which is usually why I use up arrow, ctrl-r is (usually) for finding something I'd already ran correctly, but not always. Since these keystrokes often have years of muscle memory behind them, folks get very "i'm right!!!" about them, so it's best to just force the users to pick. Popup on first use (like byobu does with ctrl-a, using this helper program: https://linux.die.net/man/1/byobu-ctrl-a) seems like the most usable thing. Thanks for your work! (to be clear I'd almost say popup on first up arrow, popup on first ctrl-r, but give the user the option to pick the defaults ie 'bash like' to skip later popups and ease into atuin style later) further parenthetical: I'm trying atuin for the history sharing/db stuff not for any UI improvements, I'm old and fine with the old ways of getting through my history, for now. :) |
Totally makes sense, thanks for the input! Will see about a popup.
Good to hear! |
+1 @rseymour. The CTRL-R overlay is great, the sync is awesome, I found the TAB key by myself (didn't notice the hint though). Thanks for the work you put into this @ellie! But I really struggle with the up-arrow keybind for two reasons:
This is obviously very opinionated, therefore I deactivated up-arrow. It would be helpful if the bash documentation (https://docs.atuin.sh/configuration/key-binding/#bash) would say that .bashrc has to be edited for this to work. Took me a moment to figure out what to do with the docs there. Leaving this here in case anyone coming from google has to change it in bash. Replace
with
in .bashrc to disable up-arrow keybind. |
Setting Otherwise, generally this section of the docs should be referred to for disabling the up arrow https://docs.atuin.sh/configuration/key-binding/#disable-up-arrow so
That way you won't need to rebind anything yourself :) I'll try making the docs clearer |
Actually I tried that command first (replacing zsh with bash felt straightforward), but it didn't work for me. I didn't debug it any further though. Thanks for the pointer to |
I tried the inline height change but uninstalled completely after the eval wasn't sticky between shell instantiations. I may try again now knowing it needs to done per instance. I'd love to have a "zero messing with my UI" atuin install option, and still get the stats and sharing. |
what do you mean? you need to put it in your .zshrc/.bashrc/etc
#798 may have what you want |
The diff between config atuin and the shell run control file isn't clear in the docs. I thought running the eval changed an atuin config globally. The docs just say shell but not the file(s) you may want to edit to keep it persistent across sessions. |
|
excellent! glad to hear it worked for you 🙏 |
This is the biggest struggle for me. I tried to get used to up-arrow for about two months, but I just cannot get over this. (EDIT: I should have read to the end, |
It isn't obvious to me how to apply the instructions at https://atuin.sh/docs/key-binding#disable-up-arrow if using antigen to load atuin, since the I suppose I could set |
For anyone using ublue, if |
I like Ctrl+R to be rebinded to use
atuin
, but I'd rather the up arrow keep its current functionality. Is there a way to achieve this?The text was updated successfully, but these errors were encountered: