Skip to content

Conversation

@Jay-Madden
Copy link

@Jay-Madden Jay-Madden commented Nov 5, 2025

The nushell integration script has a weird quirk where when keybinding ran atuin search --interactive and invoked the tui, the tui would initialize on the same line and replace the prompt text.

Gif of the prompt being replaced:
demo

The fix:
demo

I'm not entirely sure WHY this behavior only seemingly exists in nushell but this does fix it. There is perhaps a better or different way im not aware of.

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@ltrzesniewski
Copy link
Contributor

I think this is intentional: when you type something before you press Ctrl+R, Atuin replaces that prompt and uses it as a filter instead of leaving it and having two copies on the screen.

I'm not entirely sure WHY this behavior only seemingly exists in nushell

It also behaves that way on bash. I didn't test the other shells (well, besides powershell).

@Jay-Madden
Copy link
Author

Hmm interesting, I feel that my zsh integration has ALWAYS done the "open tui below existing prompt then put it back"

Example with ZSH:
image

Maybe this is a factor of the inline_height?

I have mine set to 30 https://github.com/Jay-Madden/dots/blob/ad262ac6b20fb1531c1e3f8676b97d146fae8297/atuin/config.toml#L48

I can go ahead and close this and just use my custom config myself if its desired behavior. But i'm not sure why zsh doesnt do it in that case.

@ltrzesniewski
Copy link
Contributor

ltrzesniewski commented Nov 6, 2025

I suppose the shell scripts have been written by different people, so they have slightly different behavior. I'd be interested to know what the "official" behavior should be. Maybe it could even be made configurable.

BTW, is that $"(ansi --escape "2A")" part correct for all prompts? You use a 2-line prompt, but other uses could have different heights.

@Jay-Madden
Copy link
Author

Jay-Madden commented Nov 7, 2025

Maybe it could even be made configurable.

could be worth doing, it was behavior that certainly bothered me enough to spend a few hours digging for how to revert it back to what my zsh looked like.

BTW, is that $"(ansi --escape "2A")" part correct for all prompts? You use a 2-line prompt, but other uses could have different heights.

I believe so, the gifs are a one line prompt and it works. I also just tested with a starship two line prompt and it worked fine.

I think it's "go up 2 from where the tui ended.

Which is 1 for the new prompt the tui created when it exited, then 1 to go back up to the original line.

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

Successfully merging this pull request may close these issues.

2 participants