Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
14003460
Commit
14003460
authored
May 01, 2015
by
Robby Russell
Browse files
Merge pull request #3825 from kennedyoliveira/master
Some fixes for Docker plugin
parents
cabb8f71
2dbf9951
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/docker/_docker
View file @
14003460
...
...
@@ -12,7 +12,16 @@
__docker_containers() {
declare -a cont_cmd
cont_cmd=($(docker ps | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}'))
_describe 'containers' cont_cmd
if [[ 'X$cont_cmd' != 'X' ]]
_describe 'containers' cont_cmd
}
# Output a selectable list of all containers, even not running
__docker_all_containers() {
declare -a cont_cmd
cont_cmd=($(docker ps -a | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}'))
if [[ 'X$cont_cmd' != 'X' ]]
_describe 'containers' cont_cmd
}
# output a selectable list of all docker images
...
...
@@ -57,7 +66,7 @@ __diff() {
__docker_containers
}
__events() {
__events() {
_arguments \
'--since=[Show previously created events and then stream.]'
}
...
...
@@ -98,10 +107,12 @@ __insert() {
__inspect() {
__docker_images
__docker_containers
__docker_
all_
containers
}
__kill() {
_arguments \
'(-s,--signal=)'{-s,--signal=}'[KILL Signal]'
__docker_containers
}
...
...
@@ -162,7 +173,7 @@ __rm() {
'(-f,--force=)'{-f,--force=}'[Force removal of running container]' \
'(-l,--link=)'{-l,--link=}'[Remove the specified link and not the underlying container]' \
'(-v,--volumes=)'{-v,--volumes=}'[Remove the volumes associated to the container]'
__docker_containers
__docker_
all_
containers
}
__rmi() {
...
...
@@ -216,7 +227,7 @@ __start() {
_arguments \
'(-a,--attach=)'{-a,--attach=}'[Attach container''s stdout/stderr and forward all signals to the process]' \
'(-i,--interactive=)'{-i,--interactive=}'[Attach container''s stdin]'
__docker_containers
__docker_
all_
containers
}
__stats() {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment