Command line not cleared on Ctrl-R

Hello, I have just started using Atuin (after reading Ellie’s blogpost about going fulltime on Atuin development I guess) and I like the idea. :+1:

Now, I used to use Ctrl-R which works nicely in Atuin except one quirk: if I have started to write something to the command line and then press Ctrl-R, Atuin keeps the line as a new search and me typing adds to the line. Without Atuin, pressing Ctrl-R + typing something would erase the already-entered text.

Illustration (one big screenshot as I was not able to attach more than one file :cry: ):

Of course, I can delete the whole line and start search afresh but if there was a config param to influence this behaviour, it’ll save me some clicks.

Atuin: v17.2.1
Shell: Bash with bash-preexec

Thanks!

Welcome to the community!

I see! Honestly I always just figured people would want to keep what they’ve typed as the start of the query

We could totally make this configurable, but first I just want to understand the use case a little better if that’s ok? What are you normally doing when you’ve typed something, and then invoke ctrl-r?

Are you searching for something relevant to what you’ve typed, or just wanting to start again?

Hello @ellie, thanks for the welcome and the reply.

What are you normally doing when you’ve typed something, and then invoke ctrl-r?
Are you searching for something relevant to what you’ve typed, or just wanting to start again?

Yeah, this is more like a habit of me pre-Atuin:

  • I know I want to repeat a command
  • I press Up-Arrow and see that’s not the one I want
  • I press Ctrl-R and search for the other command – this search ignores the current command line content (at least in bash and zsh)
  • when I find it I press Enter

Now, with the current Atuin (I have --disable-up-arrow in atuin init) when I press Up-Arrow and see that’s not the command I want, I have to remember pressing Ctrl-C to “erase” the line before Ctrl-R to start searching with an empty search; or else I will end up with the command line content in atuin history search and I need to long-press Backspace to start from empty …

It may look silly and I understand your reasoning. These are just years of muscle memory so not easy to unlearn. :slight_smile:

We could totally make this configurable

Would be awesome.

I hope I made it clearer.

Thanks.

2 Likes

Totally makes sense, thank you! I’ll move this to Ideas

1 Like