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

3rd party complete -C completions broken #995

Closed
3 tasks
scop opened this issue May 31, 2023 · 0 comments · Fixed by #1008
Closed
3 tasks

3rd party complete -C completions broken #995

scop opened this issue May 31, 2023 · 0 comments · Fixed by #1008

Comments

@scop
Copy link
Owner

scop commented May 31, 2023

Describe the bug

SSIA. Broken by 95eef92, but I guess this is something to fix in __load_completion.

To reproduce

See debug trace.

Expected behavior

Versions (please complete the following information)

  • Operating system name/distribution and version:
  • bash version, echo "$BASH_VERSION":
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"):

Additional context

Debug trace

$ vault + local cmd=vault
+ __load_completion vault
[...]
+ compfile=/home/scop/Documents/code/bash-completion/completions/_vault
+ [[ -d /home/scop/Documents/code/bash-completion/completions/_vault ]]
+ [[ -e /home/scop/Documents/code/bash-completion/completions/_vault ]]
+ . /home/scop/Documents/code/bash-completion/completions/_vault /usr/bin/vault
++ type /usr/bin/vault
++ complete -C '"/usr/bin/vault" 2>/dev/null' /usr/bin/vault
++ complete -p /usr/bin/vault
+ compspec='complete -C '\''"/usr/bin/vault" 2>/dev/null'\'' /usr/bin/vault'
+ extspecs=()
+ local -a extspecs
+ [[ -n '' ]]
+ [[ vault != */* ]]
+ complete -p vault
+ extspecs+=("$origcmd")
+ (( 1 != 0 ))
+ complete -C ''\''"/usr/bin/vault"' '2>/dev/null'\''' /usr/bin/vault vault
+ return 0
+ return 124
bash: command substitution: line 1: unexpected EOF while looking for matching `''
bash: command substitution: line 2: syntax error: unexpected end of file

$ complete -p vault
+ complete -p vault
complete -C ''\''"/usr/bin/vault"' vault
scop added a commit that referenced this issue Jun 17, 2023
scop added a commit that referenced this issue Jun 19, 2023
* fix(__load_completion): quoted compspec for variants

Closes #995
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
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

Successfully merging a pull request may close this issue.

1 participant