-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Zsh completion scripts do not properly escape help text #989
Comments
fix suggested in #899 (comment) |
chmouel
added a commit
to chmouel/cobra
that referenced
this issue
Nov 12, 2019
Closes spf13#989 Authored-by: Cornelius Weig <https://github.com/corneliusweig> Signed-off-by: Chmouel Boudjnah <[email protected]>
chmouel
added a commit
to chmouel/cobra
that referenced
this issue
Feb 11, 2020
Closes spf13#989 Authored-by: Cornelius Weig <https://github.com/corneliusweig> Signed-off-by: Chmouel Boudjnah <[email protected]>
This issue is being marked as stale due to a long period of inactivity |
#899 (comment) says the issue has been resolved. Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cobra gained a much more powerful zsh completion script generator with #646, showing help text for flags and sub-commands.
This help text is not properly escaped, for example when it contains brackets (#899). Also, and more importantly, it does not escape command substitution constructs such as
$(cmd)
. This causes the command in the help text to be executed whenever the completion script is invoked.Here is a minimal example to demonstrate the problem:
To reproduce the error, do
go build -o whatever
source <(./whatever)
$ ./whatever <tab><tab>
, this will execute the command marked above.The text was updated successfully, but these errors were encountered: