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

enh(bash) added gnu core utilities #3344

Merged
merged 6 commits into from Oct 5, 2021
Merged

enh(bash) added gnu core utilities #3344

merged 6 commits into from Oct 5, 2021

Conversation

katzeprior
Copy link
Contributor

@katzeprior katzeprior commented Sep 29, 2021

I added the gnu core utils commands to bash for future changes.

Almost Resolves #3342

Changes

  1. Added gnu core utilities commands to the bash list.
  2. fixed bash tests to reflect changes.
  3. fixed 1/3 test errors in shell and docker tests.

Checklist

  • Added markup tests, or they don't apply here because...
    fixed most not added
  • Updated the changelog at CHANGES.md

Katze-Prior added 2 commits September 29, 2021 16:47
* add gnu core utilities to bash
* fix bash tests to reflect changes
* update changelog
@joshgoebel
Copy link
Member

joshgoebel commented Sep 29, 2021

For a quick fix (I'm not sure how much work you want to put in here) you could just remove install from the list and then fixup the remaining tests for the least amount of effort.

@joshgoebel
Copy link
Member

joshgoebel commented Oct 5, 2021

I think that's about as close as we're going to get for now unless you want to look into adding individual rules for all the edge cases:

  • &&, |, etc...

That would be much easier to do in the future though once we support look-behind.

Thoughts?

@katzeprior
Copy link
Contributor Author

Sounds good for now. Don't know how the look-behind feature will look but i will check it out when i have more time.
Would be best if we get the start of the line and the && | working because ssh doesn't fit in the list but still should be highlighted i think.

@joshgoebel
Copy link
Member

Don't know how the look-behind feature will look

I'm speaking of look-behind in regex. Useful to say "something that was immediately proceeded by"... but it's not supported in all browsers yet, so we wait... without it you have to do a more complex multi-matcher to handle those cases.

ssh doesn't fit in the list but still should be highlighted i think.
I don't necessarily disagree but I'm not sure we should highlight "every single useful linux command" under the sun... so I feel like we may need further justification before just adding the top 50 random linux tools. :-) Feels like we need some kind of criteria.

@joshgoebel joshgoebel changed the title Bash enhancement enh(bash) added gnu core utilities Oct 5, 2021
@joshgoebel joshgoebel merged commit 7d10f7f into highlightjs:main Oct 5, 2021
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.

[Request] Imporove bash's colours.
2 participants