I get an error, when I run the command from https://docs.docker.com/compose/completion/ to install completion for zsh:
manu:~/ $ mkdir -p ~/.zsh/completion
manu:~/ $ curl -L https://raw.githubusercontent.com/docker/compose/
$\(docker-compose --version | awk 'NR==1{print $NF}')/contrib/compl
etion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose
zsh: parse error near `)'
The command you typed is different from the command in the docs:
curl -L https://raw.githubusercontent.com/docker/compose/$\(docker-compose --version | awk 'NR==1{print $NF}')/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose
# vs. the correct one
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose --version | awk 'NR==1{print $NF}')/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose
See the backslash that was added, might be because of some auto-escaping going on in your terminal. This issue should be closed?
You're right! I didn't notice the backslash, happens the first time to me. I also tried to copy paste into different terminal emulators: urxvt, xfce4-terminal, lxterminal. Everywhere the same behaviour. The backslash was added from the terminal. Maybe this should be mentioned in the documentation. Thanks for the quick solution!
Thx for the insight @LeoCavaille, I didn't notice the backslack either.
For anyone else encountering this issue, it is in fact an issue with zsh adding backslashes to URLs
Thanks, @leggomuhgreggo . For anybody else running into this remove the backslash from $\(uname -s)
when pasting the command in ZSH.
Most helpful comment
The command you typed is different from the command in the docs:
See the backslash that was added, might be because of some auto-escaping going on in your terminal. This issue should be closed?