atuin icon indicating copy to clipboard operation
atuin copied to clipboard

Add setting for keeping typed query when exiting

Open s0 opened this issue 2 years ago • 2 comments

fixes #422

This introduces a new setting that can configure the behaviour when pressing Esc in interactive mode. Currently with only 2 options, to either return the empty string (and keeping the commandline unmodified), or returning the currently written query so far.

s0 avatar Jun 13 '22 21:06 s0

On enum value naming, perhaps return-original instead of returnoriginal would be better etc...?

s0 avatar Jun 14 '22 10:06 s0

On enum value naming, perhaps return-original instead of returnoriginal would be better etc...?

I think this would definitely read better!

ellie avatar Jun 14 '22 15:06 ellie

@s0 would be awesome to get a rebase here!

if my last comment is addressed I'm excited to merge this 🚀

ellie avatar Nov 02 '22 20:11 ellie

@ellie done! There was quite a lot of code change since I last looked at this so basically had to redo it hehe 😅

Not sure if I'm happy with the double if statement at the end there, but not sure if not explicitly checking RETURN_QUERY would then make it unclear?

s0 avatar Nov 05 '22 19:11 s0

Looks like clippy didn't like the duplicate if statement blocks, removed them and just have a comment for now

s0 avatar Nov 05 '22 20:11 s0