machine icon indicating copy to clipboard operation
machine copied to clipboard

_get_comp_words_by_ref missing

Open diver-sity opened this issue 9 years ago • 4 comments

Hi docker-machine authors, I was trying out the bash completion scripts. After adding docker-machine.bash docker-machine-prompt.bash to ~/.bashrc and "source" them, this error was thrown:

$ docker-machine -bash: _get_comp_words_by_ref: command not found
-bash: ((: i < : syntax error: operand expected (error token is " ")
-bash: _get_comp_words_by_ref: command not found
-bash: ((: i < : syntax error: operand expected (error token is " ")

I searched for _get_comp_words_by_ref in this repository, but only a usage was found. It might have been removed, I guess. Do you guys still have that function by any chance?

diver-sity avatar Jan 26 '17 10:01 diver-sity

_get_comp_words_by_ref is a function provided by the bash-completion package.

Possible causes for your error message would be

  • bash-completion is not installed
  • bash-completion is not invoked from your login scripts
  • you source the completion files before bash-completion is initialized

albers avatar Feb 21 '17 13:02 albers

Thanks @albers . I'm going to close the issue as I think it's related to installation issues

nathanleclaire avatar Feb 23 '17 17:02 nathanleclaire

source /etc/profile if you aren't already (i.e.: when using bash with alpine).

mateothegreat avatar Dec 14 '17 14:12 mateothegreat

source /etc/profile if you aren't already (i.e.: when using bash with alpine).

This worked for bash with centos too. thanks!

pradhyu avatar Apr 11 '19 14:04 pradhyu