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

✨ Remove Rich tags when showing completion text #877

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

svlandeg
Copy link
Member

@svlandeg svlandeg commented Jul 3, 2024

Upon completion, print the help text with Rich if it's available. Fixes #822.

Original behaviour, as reported in #822: hitting TAB TAB shows the autocompletion with literal Rich formatting, e.g.

goodbye -- Say [bold]goodbye[/bold] to the user.

With this PR, the Rich tags are removed:

goodbye -- Say goodbye to the user.

In my experiments, this does not yet actually format the text with the right colors etc. Not sure whether that's due to the shells/OS's I've tried - further input from others using different systems would be appreciated!

Powershell on Windows

  • Shows Rich tags in completion text with master
  • Removes Rich tags in completion text with this PR
  • Shell is able to show Rich formatting in simple script
  • Shows Rich formatting in completion text with this PR

GitBash using zsh shell on Windows

I couldn't yet get this shell to work with Rich formatting - probably because it's an emulated shell.

  • Shows Rich tags in completion text with master
  • Removes Rich tags in completion text with this PR
  • Shell is able to show Rich formatting in simple script
  • Shows Rich formatting in completion text with this PR

@svlandeg svlandeg added feature New feature, enhancement or request p3 labels Jul 3, 2024
@svlandeg svlandeg marked this pull request as ready for review July 3, 2024 10:30
@kinuax
Copy link
Contributor

kinuax commented Jul 4, 2024

PR Review according to #821.

zsh on Linux

  • Shows Rich tags in completion text with master
  • Removes Rich tags in completion text with this PR
  • Shell is able to show Rich formatting in simple script
  • Shows Rich formatting in completion text with this PR

@svlandeg svlandeg changed the title ✨ Remove Rich tags when showing completion text ✨ Remove Rich tags when showing completion text Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request p3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rich markup in Zsh completion help lines
2 participants