fix(nushell): reposition cursor back to original prompt after atuin invoked#2979
fix(nushell): reposition cursor back to original prompt after atuin invoked#2979Jay-Madden wants to merge 3 commits intoatuinsh:mainfrom
Conversation
|
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.
It also behaves that way on bash. I didn't test the other shells (well, besides powershell). |
|
Hmm interesting, I feel that my zsh integration has ALWAYS done the "open tui below existing prompt then put it back" Maybe this is a factor of the I have mine set to 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. |
|
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 |
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.
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. |

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

The fix:

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