Fix autocompletion of Docker containers

Since version 0.6.5, Docker ensures that new containers are named by generating it if not passed.
This commit fixes the container autocompletion by referring to the last column given by `docker ps -a`.
This commit is contained in:
Dag Einar Monsen 2014-09-11 12:33:02 +02:00
commit be94d24125

View file

@ -10,7 +10,7 @@
# Output a selectable list of all running docker containers
__docker_containers() {
declare -a cont_cmd
cont_cmd=($(docker ps | awk 'NR>1{print $1":[CON("$1")"$2"("$3")]"}'))
cont_cmd=($(docker ps -a | awk 'NR>1{print $NF}'))
_describe 'containers' cont_cmd
}