Is this a bug in the parser, such that it sees unbalanced quotes within a comment (within this context (command substitution?) as an error, or..?
This works:
echo (
test ""
and echo a # comment 1 ''
or echo b # comment 2 ''
)
But this gets an error:
echo (
test ""
and echo a # comment 1 '''
or echo b # comment 2 ''
)
fish: Unexpected end of string, quotes are not balanced
and echo a # '
^
(fish, version 2.7.1 (ppa 3.2.1-1~focal))
(
Also work:
echo (
test ""
and echo a # comment 1 '''
or echo b # comment 2 '''
)
echo (
test ""
and echo a # comment 1 '
or echo b # comment 2 '
)
and of course:
echo (
test ""
and echo a # comment 1
or echo b # comment 2
)
...
a few other notes:
✔️ works:
echo (
test ""
and echo a # comment 1 '
or echo b # comment 2
#'
)
❌ fails:
echo (
test ""
and echo a # comment 1 '
or echo b # comment 2
) #'
❌ fails:
echo (
test ""
and echo a # comment 1 '
or echo b # comment 2
)
#'
✔️ works:
echo ( #'
test ""
and echo a # comment 1 '
or echo b # comment 2
)
)
Is this a bug in the parser, such that it sees unbalanced quotes within a comment (within this context (command substitution?) as an error, or..?
This works:
But this gets an error:
(fish, version 2.7.1 (ppa 3.2.1-1~focal))
(
Also work:
and of course:
...
a few other notes:
✔️ works:
❌ fails:
❌ fails:
✔️ works:
)