#Different Styles/Modes for Ctrl-R and Up

1 messages ยท Page 1 of 1 (latest)

cinder pewter
#

Is it possible to configure it like this:

# Ctrl-R: 
style = "full"
inline_height = 0
filter_mode = "global"

# Up
style = "compact"
inline_height = 20
filter_mode = "session"

I've only been able to figure out how to change it globally for both

I love the different filter modes and would love to use them with "Up" as well, but I would like to keep some of the swiftness of the regular up key.

I probably want to see the output of the previous command while I go through the recent history, so I don't want it fullscreen, whereas for Ctrl-R, I often spend more time in there looking for more options, so there I want fullscreen.

it really breaks my muscle memory that the command is not automatically inserted into the prompt, but one has to it Enter to submit. My default zsh cycles through commands directly in the prompt, so often, when a command fails, I just hit up and edit the command and hit enter again. Now with atuin I have to hit up, then enter, edit end then enter again. Is it possible to change that? Same is true for Ctrl-R, but there it doesn't really bother me as much. But as long as there is an extra key press, I don't think I can use up binding.

rugged elbow
#

You might be able to configure by customising the init script and setting the necessary environment variables

#

it really breaks my muscle memory that the command is not automatically inserted into the prompt, but one has to it Enter to submit.

You do get used to it. But I understand too. Someone was working on a patch but I'm not sure where it left off. It required work on a shell by shell basis iirc

cinder pewter
#

Thanks for the swift reply!

Not sure if I want to get used to it, I jump to different servers regularly, where I cannot modify my environment, so I definitely need the muscle memory for the regular behavior there...

#

I couldn't find the PR, I'm new to rust, but htis could be a fun learning experience. Would you consider merging this kind of feature if it is configurable?

rugged elbow
#

Yes we would want this functionality. I'll try find the PR

#

https://github.com/atuinsh/atuin/pull/907 this was the old way which we didn't like too much.

The way we wanted to have it done is part of the shell setup. EG instead of zle reset-prompt it could be zle accept-line https://github.com/atuinsh/atuin/blob/14bef9c4a4047e57851c1dad76ae85c121171d49/atuin/src/shell/atuin.zsh#L44C21-L44C21

https://zsh.sourceforge.io/Doc/Release/Zsh-Line-Editor.html#Miscellaneous

I don't think it would take too much rust to implement this, mostly shell related. However we could return a custom exit code to tell the shell script info. Unsure

GitHub

This PR adds a new settings::ExitMode::ReturnExecute.
In the match cases in fn handle_key_input we still return RETURN_ORIGINAL or RETURN_QUERY as we are not looking for other entries in the histor...

vestal sun
#

I think we'd probably want to print something like 0|the command or 1|the command in place of where we currently just print the command

#

and then the shell can decide what to do

vivid pilot