legacy-cli icon indicating copy to clipboard operation
legacy-cli copied to clipboard

Fix #1171: Autocompletion not working on Windows

Open lolautruche opened this issue 3 years ago • 4 comments

Add quotes around the application executable before passing it to the autocomplete hook script. Quoting prevents issues with the path when containing special characters (WS and/or \).

lolautruche avatar Oct 26 '22 08:10 lolautruche

The fix might be

  • this, or
  • #1175 (using --multiple and thus $1 _completion in the hook), and/or
  • https://github.com/stecman/symfony-console-completion/pull/92 (escaping the path and/or quoting the $1)

pjcdawkins avatar Oct 26 '22 09:10 pjcdawkins

Not sure what the --multiple option does. I read the description in the original command, but it's still unclear to me.

lolautruche avatar Oct 26 '22 13:10 lolautruche

The --multiple appears to just change <path> _completion to $1 _completion so if you run platfoo <tab> Bash should be using platfoo as the command name, etc. Which seems convenient, if it works.

pjcdawkins avatar Oct 26 '22 14:10 pjcdawkins

Thanks for the clarification 👍 Seems handy indeed.

lolautruche avatar Oct 26 '22 14:10 lolautruche