mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
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:
parent
96e4e5dd03
commit
be94d24125
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
# Output a selectable list of all running docker containers
|
# Output a selectable list of all running docker containers
|
||||||
__docker_containers() {
|
__docker_containers() {
|
||||||
declare -a cont_cmd
|
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
|
_describe 'containers' cont_cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue