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

Minor verbose command coloring bug #1119

Closed
stefansundin opened this issue Mar 4, 2025 · 3 comments · Fixed by #1122
Closed

Minor verbose command coloring bug #1119

stefansundin opened this issue Mar 4, 2025 · 3 comments · Fixed by #1122
Assignees

Comments

@stefansundin
Copy link

stefansundin commented Mar 4, 2025

Hello,

This is a rather minor issue but figured I'd report it anyway.

I have this code:

$.verbose = true;
await $`sass --style=compressed src/static/bootstrap.scss > dist/static/bootstrap-v5.3.3.min.css`;

And it is displayed like this:

Image

The green color on the output redirection part (> dist/static/bootstrap-v5.3.3.min.css) does not cover the whole path, breaking at the - character.

I expect the whole path to have the same color. If I remove the - I get this:

Image

If I change my sass command to the imaginary sass-compiler command, then we can see that it too looks broken, and the whole sass-compiler command should be green:

Image

I would also be in favor of changing the color when there's any kind of output redirection. It seems like it is green just because it is the first word after a special keyword, but I think it would be appropriate if it had its own dedicated color. If this is implemented then care should be taken so it also works with other output redirection (2>, &>), and also input (<).

Thanks!

Tested with zx v8.2.4 and v8.4.0.

@antongolub antongolub self-assigned this Mar 5, 2025
@antongolub
Copy link
Collaborator

@stefansundin,

Thanks for highlighting the issue. I'll take a look on this week.

@antonmedv
Copy link
Collaborator

Creating a code highlighting for bash is very complicated. There are always will be some cut corners.

@antongolub
Copy link
Collaborator

Image

antongolub added a commit to antongolub/zx that referenced this issue Mar 8, 2025
antongolub added a commit to antongolub/zx that referenced this issue Mar 8, 2025
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 a pull request may close this issue.

3 participants