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

] in parameter expansion causes error #274

Open
rivke41levp656 opened this issue Sep 18, 2024 · 0 comments
Open

] in parameter expansion causes error #274

rivke41levp656 opened this issue Sep 18, 2024 · 0 comments

Comments

@rivke41levp656
Copy link

Look at the following script:

#!/bin/bash

# comment is grey — syntax highlighting works
temp="${temp%]*}"

# comment is not grey — syntax highlighting is broken here

: "$"
# comment is grey again — syntax highlighting somehow restored

tree output:

(program ; [0, 0] - [9, 0]
  (comment) ; [0, 0] - [0, 11]
  (comment) ; [2, 0] - [2, 51]
  (variable_assignment ; [3, 0] - [7, 5]
    name: (variable_name) ; [3, 0] - [3, 4]
    value: (string ; [3, 5] - [7, 5]
      (expansion ; [3, 6] - [7, 3]
        (variable_name) ; [3, 8] - [3, 12]
        (ERROR ; [3, 13] - [3, 16]
          (word)) ; [3, 13] - [3, 15]
        (string ; [3, 16] - [7, 3]
          (string_content) ; [5, 0] - [5, 60]
          (string_content))))) ; [7, 0] - [7, 2]
  (comment)) ; [8, 0] - [8, 64]
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

No branches or pull requests

1 participant