2

Basically, I'm wondering if its possible to do this:

#compdef foo
_arguments \
    '--arg=[Description of --arg [With square brackets in the string!]]' \

without getting an invalid option error due to the nested square brackets?

I've tried all manner of escape characters. Single vs. double quotes makes no difference.

1 Answers1

0

Try to escaping them like this:

'--arg=\\[Description of --arg \\[With square brackets in the string!\\]\\]'
DreddyI
  • 1
  • 1