Skip to content
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

One cursor-up history per session #468

Closed
norpol opened this issue Jun 29, 2022 · 7 comments
Closed

One cursor-up history per session #468

norpol opened this issue Jun 29, 2022 · 7 comments

Comments

@norpol
Copy link

norpol commented Jun 29, 2022

I'm often working on multiple terminal windows in parallel, would it be possible to have separate sessions while I'm still working on each window?

This means when I'm pushing cursor up in one session, I'm not presented with the most recent commands but the most recent commands in this very window.

@conradludgate
Copy link
Collaborator

The interactive search currently has support for single-session search, but I don't think there's currently a way to force it on launch. We could have a --session flag or ATUIN_SEARCH=SESSION env to configure it I guess

@norpol
Copy link
Author

norpol commented Jun 29, 2022

Using export ATUIN_NOBIND="true" works for me as a workaround for now. Cursor up will only show me most recent from this session and then later the most recent until the point of opening the shell.

export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"

@karfau
Copy link

karfau commented Nov 23, 2022

After reading the docs I think setting the filter_mode option to session would at least allow you to always start in that mode: https://github.com/ellie/atuin/blob/main/docs/config.md#filter_mode

For me it would make sense if using the up key always starts in that mode, and Ctrl+r would always start in whatever is configured in the configuration. (Or if it would be possible to configure the filter_mode for the up key separately.)

@arcuru
Copy link
Sponsor Contributor

arcuru commented Nov 25, 2022

For me it would make sense if using the up key always starts in that mode, and Ctrl+r would always start in whatever is configured in the configuration.

I agree with this. I've been planning on adding a flag to the interactive search CLI to specify the filter_mode which would let me specify this in my own config, basically what Conrad suggests above although I would write it as --filter-mode and take an argument. I'm not sure if most users want that though, so I'd hesitate to put it into the default init scripts.

For now I actually just disable the up key binding and use my normal shell history, since that is more intuitive for me.

@karfau
Copy link

karfau commented Nov 26, 2022

For now I actually just disable the up key binding and use my normal shell history, since that is more intuitive for me.

I did the same

@tpoliaw
Copy link
Contributor

tpoliaw commented Jan 19, 2024

Is this now fixed by #635? I think setting filter_mode_shell_up_key_binding = "session" in config should get this behaviour.

@ellie
Copy link
Member

ellie commented Jan 22, 2024

It is! Thanks for prompting 🙏

@ellie ellie closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants