Sometimes, when we log in to linux, we may encounter such problems, prompting us docker-xomposethat there are some errors, as follows:
-bash: /etc/bash_completion.d/docker-compose: line 22: syntax error near unexpected token `$'{
\r''
'bash: /etc/bash_completion.d/docker-compose: line 22: `__docker_compose_q(){
Cause Analysis
The docker-compose file format is incompatible, and there are hidden dangers: it may cause docker-composethe command to fail!
The newline character of the doc format file is different from that of the Unix format file, /etc/bash_completion.d/docker-composejust open and modify the file format according to the prompt
Solution
Using the MobaXterm software, open the file using the default editor