-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Customize up arrow behavior #1639
Comments
I think this is a dupe of #798. https://docs.atuin.sh/configuration/config/#search_mode_shell_up_key_binding This config would enable to you make the up arrow use the Otherwise, with
Many people are happy with the TUI on the up arrow, hence it is there by default |
It is indeed a dupe, sorry for that. I couldn't that issue and it and it looks like I'm not the only one looking for this feature. Thanks again |
Did any of the existing config solve your issue? Or would you rather not use the TUI? |
TUI is great for advanced search but to me it kinda feels overkill for up-arrow behavior. The closest thing to what I would like is Thanks again and keep up the good work :) |
I recently discovered atuin and it's an awesome tool, thanks for developing it!
Anyhow, a question came to my mind: my muscle memory forces me to use
Ctrl+r
for a more advanced search and theup
key to retrieve in a faster way the commands I just typed.The question basically is: wouldn't it be possible to make the
up
key to behave like the standard retrieval fromHISTFILE
backed instead by atuin's database? Of course this should be configurable and probably not enabled by default.I try to make an example if my words were not clear (not native-english speaker here):
Atuin database content (to simplify each row is represented by three fields separated by pipe |: first is an id, second field is command, third field is cwd; entries are sorted by time
DESC
):4|vi .xinitrc |/home/proudatuinuser
3|vi $HOME/.config/atuin/config.toml |/home/proudatuinuser/gitrepo
2|curl example.com |/var
1|curl ifconfig.me |/home/proudatuinuser/gitrepo
Let's say I'm in my
$HOME (/home/proudatuinuser)
and my prompt is empty.I type
up
and I would expect command4
to appear in my prompt. Typing againup
would change prompt to command3
and so on.Another example: if prompt is not empty, let's say it contains the string
"cu"
, typingup
I would expect command2
.Of course if I were to be in a folder that contains a git repo (
$HOME/gitrepo
) and theworkspace
flag is enabled if I start typing"v"
and I press up I expect3
. In my example this would be the case with an empty prompt too.I hope to have conveyed what I mean in an efficient and comprehensible way, otherwise let me know.
As of now, as a workaround I use
--disable-up-arrow
so that when I pressup
I use the standardHISTFILE
, and when I need atuin super-powers I pressCtrl+r
.There are probably some other way to get around this like binding
up
arrow to a customatuin search
command, but I believe it might be a good behavior to add to atuin. You already say thatOur default up-arrow binding can be a bit contentious.
. This might make happy both types of users.Apologies if this question was already asked but I couldn't find anything quite like it.
The text was updated successfully, but these errors were encountered: