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

Shell syntax error for $# #1378

Open
timhillgit opened this issue Oct 8, 2022 · 0 comments
Open

Shell syntax error for $# #1378

timhillgit opened this issue Oct 8, 2022 · 0 comments
Labels
better to fix unwanted behaviors better to fix syntax highlight issues related to syntax highlighting

Comments

@timhillgit
Copy link

Description

screenshot

When highlighting the value $# in Shell Script, the editor interprets the # as the start of a comment (see line 1 in screenshot). This both highlights the value incorrectly and "comments out" the rest of the line, which is incorrect. Line 2 of the screenshot has an example of what the highlighting should look like.

To Reproduce

  1. Enter the text (( $# == 0 ))
  2. Switch to "Shell Script" syntax

Expected behavior

$# should be highlighted as a value, not half-value half-comment, and should not comment out the rest of the line.

CotEditor version

4.3.6 (530)

macOS version

12.6 (21G115)

Additional context

The syntax file for shell:

- beginString: "$#"

appears to be correct so this may be a deeper issue than just a syntax file.

@timhillgit timhillgit added the potential bug issues not yet tested label Oct 8, 2022
@1024jp 1024jp added syntax highlight issues related to syntax highlighting better to fix unwanted behaviors better to fix and removed potential bug issues not yet tested labels Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better to fix unwanted behaviors better to fix syntax highlight issues related to syntax highlighting
Development

No branches or pull requests

2 participants