eclipse-bash-editor icon indicating copy to clipboard operation
eclipse-bash-editor copied to clipboard

ANSI-C quoting error

Open patrick-melo opened this issue 5 years ago • 3 comments

When I pasted the code below into the editor, I see an error. It appears that the editor doesn't support ANSI-C Quoting (https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html#ANSI_002dC-Quoting).

Code

#!/bin/bash
main() {
     text=$'"can\'t"'
     echo $text 
}
main

Error

Multiple markers at this line

  • This curly brace is not closed. So function 'main' is not valid.
  • It seems this opening bracket is missing a closing one.

patrick-melo avatar Sep 03 '20 17:09 patrick-melo

Also, when I start typing the main function, it replaces my curly braces with square brackets. Is this related to the editor as well? Does it already have a ticket?

patrick-melo avatar Sep 03 '20 17:09 patrick-melo

I can confirm, with Version 2.5.0 on eclipse 2020-12 I got the same problem about curly braces image

Output is:

albert@devtux:~/test $./test.sh
"can't"

de-jcup avatar Feb 19 '21 18:02 de-jcup