atuin
atuin copied to clipboard
Add setting for keeping typed query when exiting
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.
On enum value naming, perhaps return-original
instead of returnoriginal
would be better etc...?
On enum value naming, perhaps
return-original
instead ofreturnoriginal
would be better etc...?
I think this would definitely read better!
@s0 would be awesome to get a rebase here!
if my last comment is addressed I'm excited to merge this 🚀
@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?
Looks like clippy didn't like the duplicate if statement blocks, removed them and just have a comment for now