Also adds a fix for an error message on some completions when no
compose file is present:
docker-compose build awk: cannot open docker-compose.yml (No such file or directory)
Signed-off-by: Harald Albers <github@albersweb.de>
In most of this file and in Dockers's bash completion the sort order of
options is to sort alphabetically by long option name.
The short options are put right behind their long couterpart.
This commit improves consistency.
Signed-off-by: Harald Albers <github@albersweb.de>
Wrong placement of `compopt -o` introduces an unexpected behavior that did
not matter as long as --help was the only option (you would probably not
continue to type after --help): completion of options would not automatically
append a whitespace character as expected.
For the outstanding addition of the --timeout option, which has an
argument, this would mean that the user would have to type an extra
whitespace after completion of --timeout before the argument could be
added.
Signed-off-by: Harald Albers <github@albersweb.de>
The commands `stop`, `restart`, and `up` now support a flag `--timeout`.
It represents the number of seconds to give the services to comply to
the command. In case of `up`, this is only relevant if running in
attached mode.
Signed-off-by: Paul Horn <knutwalker@gmail.com>