-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Request] Imporove bash's colours. #3342
Comments
How long would this list be?
We could. Are there no cases where that would lead to false positives?
Neat idea, I think the new multi-matcher stuff could help here since we'd want to highlight |
the gnu core utils would be 104 items as listed on the wikipedia page, there might be more.
There is a edit: |
So we'd need to exclude:
I imagine the rule would be (roughly) something like I'd welcome a PR exploring some of these ideas, perhaps starting with just the GNU core utils list... |
my first PR is going better then expected, running into one issue with the tests, i fixed the bash tests to reflect the changes i made but im getting some issues in the dockerfile test and shell test because both have I counted a total of 3 keywords where only 1 of them should be updated to reflect the changes the other 2 should not be included in the parsing with bash. for shell: for dockerfile: |
If those embed bash then they would need to be updated also to reflect the new changes to bash.
Yes, we'd need a mode to capture full paths... likely just a variant of whatever rule we use to capture commands at the beginning...
There is no way to not recognized keywords, so if the commands aren't unambiguous then we may not be able to use them with the
Not sure why this is an issue, it is effectively a command in this case, no? |
Would it be enough to change the test so the mkdir is reflecting the new changes and leave the other 2 issues for a future change and make send the pull request of what i have currently? |
Just submit what you having passing or failing and let me have a look. |
Is your request related to a specific problem you're having?
I'm always frustrated when I write a bash code block but it does not support the gnu coreutils so some of the commands are not highlighted like
grep and cat
for example.it also doesn't recognize executables that i installed like
nmap
or any other program.The solution you'd prefer / feature you'd like to see added...
A clear and concise description of how you imagine we might solve this (if you have any ideas).
add it to the built_in of bash.js
for the other executables that are not in the gnu coreutils or sh buildins i don't know a easy fix, you could make everything coloured that starts at the beginning of the line also include
./<executable name>
or if it comes after the pipeecho "cGxlYXNlIGZpeAo=" | base64 -d
so echo and base64 are yellow because currently base64 is not.gnu core utils
Any alternative solutions you considered...
I don't have an alternative solution.
Additional context...
only test and echo are coloured, im missing the cat and grep.
also it would be nice to see the ./ also getting a colour.
The text was updated successfully, but these errors were encountered: