When trying to source the docker-machine autocompletion script in bash on macOS 10.11, it encounters an error. Given that macOS uses a very old version of bash, it is quite possible there is syntax being used here that is simply unsupported instead of just being a bug. Am running Docker for Mac 17.06.0-ce-mac18 (18433) on macOS 10.11. More details below.
$ bash -version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.
$ source /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion
-bash: /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion: line 86: syntax error in conditional expression: unexpected token `('
-bash: /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion: line 86: syntax error near `@($'
-bash: /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion: line 86: ` [[ ${words[$glob_pos]} == @($glob) ]] && echo "$key"'
When trying to
sourcethedocker-machineautocompletion script inbashon macOS 10.11, it encounters an error. Given that macOS uses a very old version ofbash, it is quite possible there is syntax being used here that is simply unsupported instead of just being a bug. Am running Docker for Mac 17.06.0-ce-mac18 (18433) on macOS 10.11. More details below.