mirror of https://github.com/docker/cli.git
Move zsh completion logic to new subcommand: cp
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
aee4d2e078
commit
2d250dcaf1
|
@ -536,7 +536,20 @@ __docker_container_subcommand() {
|
|||
"($help -): :__docker_repositories_with_tags" && ret=0
|
||||
;;
|
||||
(cp)
|
||||
__docker_subcommand && ret=0
|
||||
_arguments $(__docker_arguments) \
|
||||
$opts_help \
|
||||
"($help -L --follow-link)"{-L,--follow-link}"[Always follow symbol link]" \
|
||||
"($help -)1:container:->container" \
|
||||
"($help -)2:hostpath:_files" && ret=0
|
||||
case $state in
|
||||
(container)
|
||||
if compset -P "*:"; then
|
||||
_files && ret=0
|
||||
else
|
||||
__docker_complete_containers -qS ":" && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(create)
|
||||
__docker_subcommand && ret=0
|
||||
|
@ -1699,20 +1712,7 @@ __docker_subcommand() {
|
|||
esac
|
||||
;;
|
||||
(cp)
|
||||
_arguments $(__docker_arguments) \
|
||||
$opts_help \
|
||||
"($help -L --follow-link)"{-L,--follow-link}"[Always follow symbol link]" \
|
||||
"($help -)1:container:->container" \
|
||||
"($help -)2:hostpath:_files" && ret=0
|
||||
case $state in
|
||||
(container)
|
||||
if compset -P "*:"; then
|
||||
_files && ret=0
|
||||
else
|
||||
__docker_complete_containers -qS ":" && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
__docker_container_subcommand && ret=0
|
||||
;;
|
||||
(create)
|
||||
_arguments $(__docker_arguments) \
|
||||
|
|
Loading…
Reference in New Issue