-
Notifications
You must be signed in to change notification settings - Fork 4
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
Shell script: # followed by non-whitespace may or may not be comment #24
Comments
@J-Siu I have tried these strings in VSC and found that syntax highlighting correctly detects the comments and command arguments. I have looked a the TextMate Grammar and it is not easy to filter these If I read the TextMate Grammar correct it also accepts |
@rioj7 Understand. I think unless you can leverage some existing tool like "shell syntax", "shell format", or some parsing library, it will be very complicated. One no so ideal workaround is add a "Remove All Single Line Comments", which ignore in-line comments, and add full support of shell script in future. |
@J-Siu I can make the lines that have the first non whitespace a |
@rioj7 I actually see there is a "Remove All Single Line Comments" already. So the workaround already exist. Not sure why I missed it before🤦♂️ |
@J-Siu A |
@rioj7 Yes. "Remove All Single Line Comments" currently also remove in-line comments. |
@J-Siu in v1.13.2 I have set that only lines starting with |
@rioj7 "Remove All Single Line Comments" is working correctly now. |
Version 1.13.1
When
Remove All Comments
, following line (fromp10k.zsh
):becomes:
The correct outcome should be:
Additional information:
#
immediately followed by non-white-space, it may or may not not be comment.The text was updated successfully, but these errors were encountered: