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

fix(bash): improve output of enter_accept #1342

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

arcuru
Copy link
Sponsor Contributor

@arcuru arcuru commented Oct 27, 2023

Very similar change to #1341, but for bash.

Bash's behavior here is worse than fish, as it only redraws the prompt line that has input (why we only need to add 1 additional line after the eval). It also does not show the prompt line at all on an echo. There's not really a way to get this to look normal AFAICT, aside from trying to redraw everything ourselves.

As an example, this is what running ls, echo here, then selecting echo here from the atuin menu will look like:

1 line prompt:

$ ls
code downloads

$ echo here
here

echo here
here

$ cursor

2 line prompt:

~promptfirstline/
$ ls
code downloads

~promptfirstline/
$ echo here
here

~promptfirstline/
echo here
here

$ cursor

@vercel
Copy link

vercel bot commented Oct 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
atuin-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 27, 2023 6:31am

Copy link
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ellie ellie merged commit fa7caf4 into atuinsh:main Oct 27, 2023
10 checks passed
@ellie
Copy link
Member

ellie commented Oct 27, 2023

appreciate you sorting these both out! it's a shame fish/bash don't have anything like zle, but this is definitely an improvement

@arcuru arcuru deleted the bash-enteraccept branch October 27, 2023 14:50
@arcuru
Copy link
Sponsor Contributor Author

arcuru commented Oct 27, 2023

No problem! These are unfortunately always going to be a bit of a hack, but they're close enough I think it's still worth keeping them in.

@aborrero
Copy link

this fix is important. Could you please consider doing at least a point release? thanks in advance.

@ellie
Copy link
Member

ellie commented Oct 27, 2023 via email

@aborrero
Copy link

thanks for your hard work in this project. It is really appreciated :-)

aborrero added a commit to aborrero/ansible-setup that referenced this pull request Oct 30, 2023
For now, it is buggy, see atuinsh/atuin#1342

Signed-off-by: Arturo Borrero Gonzalez <arturo.bg@arturo.bg>
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.

None yet

3 participants