Skip to content

Conversation

@akinomyoga
Copy link
Contributor

@akinomyoga akinomyoga commented Jan 23, 2024

Fixes #1617

This contains an extra commit dc2afa7, which counts the newlines in the prompt result using Bash's built-in features. The previous implementations used the external command wc with the command substitution, which involves 3 forks and 1 exec so is slow. We can count newlines by first removing all the characters except for the newlines and then counting the number of remaining characters.

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.

thank you! lots of shell improvements from you, really appreciate it 🙏

@ellie ellie merged commit 067bda6 into atuinsh:main Jan 23, 2024
@akinomyoga akinomyoga deleted the bash-PS1 branch January 23, 2024 21:56
@akinomyoga
Copy link
Contributor Author

Thanks!

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.

Character encoding on bash breaks starship prompt

2 participants