From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4274 invoked by alias); 17 Dec 2014 22:46:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33999 Received: (qmail 12481 invoked from network); 17 Dec 2014 22:45:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Date: Wed, 17 Dec 2014 14:09:24 -0800 From: Lokesh Mandvekar To: zsh-workers@zsh.org Subject: patch to remove docker completion file (maintained by upstream docker) Message-ID: <20141217220923.GA4520@naruto> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 --wzJLGUyc3ArbnUjN Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable PFA patch attached to remove _docker completion. Upstream docker updates th= is regularly and I realized it'd be too painful to keep sending it here. Apologies about the noise. Thanks. --=20 Lokesh Freenode, OFTC: lsm5 GPG: 0xC7C3A0DD --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Remove-docker-completion.patch" Content-Transfer-Encoding: quoted-printable =46rom f5ff0abaf5aa37f38d895caf2ec6c4bbae775841 Mon Sep 17 00:00:00 2001 =46rom: Lokesh Mandvekar Date: Wed, 17 Dec 2014 21:57:10 +0000 Subject: [PATCH] Remove docker completion This commit removes the docker completion file (reverts commit 56439df95d63986c2db07f39956c3e60ce4851f7) Docker completion is provided and updated regularly via upstream docker and it's perhaps best for downstream distros to use it than the one provided by default zsh. Signed-off-by: Lokesh Mandvekar deleted: Completion/Linux/Command/_docker --- Completion/Linux/Command/_docker | 410 -----------------------------------= ---- 1 file changed, 410 deletions(-) delete mode 100644 Completion/Linux/Command/_docker diff --git a/Completion/Linux/Command/_docker b/Completion/Linux/Command/_d= ocker deleted file mode 100644 index faf17b2..0000000 --- a/Completion/Linux/Command/_docker +++ /dev/null @@ -1,410 +0,0 @@ -#compdef docker -# -# zsh completion for docker (http://docker.com) -# -# version: 0.3.0 -# github: https://github.com/felixr/docker-zsh-completion -# -# contributers: -# - Felix Riedel -# - Vincent Bernat -# -# license: -# -# Copyright (c) 2013, Felix Riedel -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are m= et: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distributio= n. -# * Neither the name of the nor the -# names of its contributors may be used to endorse or promote produc= ts -# derived from this software without specific prior written permissi= on. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS = IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IM= PLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAG= ES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVI= CES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED = AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TO= RT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF= THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -__parse_docker_list() { - awk ' -NR =3D=3D 1 { - idx=3D1;i=3D0;f[i]=3D0 - header=3D$0 - while ( match(header, / ([A-Z]+|[A-Z]+ [A-Z]+)/) ) { - idx +=3D RSTART+1 - f[++i]=3Didx - header =3D substr($0,idx) - } - f[++i]=3D999 -} - -NR > 1 '"$1"' { - for(j=3D0;j 1 = && $1 !=3D ""){printf("%s", $1);if ($2 !=3D "") printf("\\:%s",= $2); printf("\n")}')"}) - images=3D($images ${(f)"$(_call_program commands docker images | awk '= (NR > 1){printf("%s:%-15s in %s\n", $3,$2,$1)}')"}) - _describe -t docker-images "Images" images -} - -__docker_tags() { - local expl - declare -a tags - tags=3D(${(f)"$(_call_program commands docker images | awk '(NR>1){pri= nt $2}'| sort | uniq)"}) - _describe -t docker-tags "tags" tags -} - -__docker_repositories_with_tags() { - if compset -P '*:'; then - __docker_tags - else - __docker_repositories -qS ":" - fi -} - -__docker_search() { - # declare -a dockersearch - local cache_policy - zstyle -s ":completion:${curcontext}:" cache-policy cache_policy - if [[ -z "$cache_policy" ]]; then - zstyle ":completion:${curcontext}:" cache-policy __docker_caching_= policy - fi - - local searchterm cachename - searchterm=3D"${words[$CURRENT]%/}" - cachename=3D_docker-search-$searchterm - - local expl - local -a result - if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \ - && ! _retrieve_cache ${cachename#_}; then - _message "Searching for ${searchterm}..." - result=3D(${(f)"$(_call_program commands docker search ${searchter= m} | awk '(NR>2){print $1}')"}) - _store_cache ${cachename#_} result - fi - _wanted dockersearch expl 'Available images' compadd -a result -} - -__docker_caching_policy() -{ - # oldp=3D( "$1"(Nmh+24) ) # 24 hour - oldp=3D( "$1"(Nmh+1) ) # 24 hour - (( $#oldp )) -} - - -__docker_repositories () { - local expl - declare -a repos - repos=3D(${(f)"$(_call_program commands docker images | sed -e '1d' -e= 's/[ ].*//' | sort | uniq)"}) - _describe -t docker-repos "Repositories" repos "$@" -} - -__docker_commands () { - # local -a _docker_subcommands - local cache_policy - - zstyle -s ":completion:${curcontext}:" cache-policy cache_policy - if [[ -z "$cache_policy" ]]; then - zstyle ":completion:${curcontext}:" cache-policy __docker_caching_= policy - fi - - if ( [[ ${+_docker_subcommands} -eq 0 ]] || _cache_invalid docker_subc= ommands) \ - && ! _retrieve_cache docker_subcommands; - then - _docker_subcommands=3D(${${(f)"$(_call_program commands - docker 2>&1 | sed -e '1,6d' -e '/^[ ]*$/d' -e 's/[ ]*\([^ ]\+\)\s*= \([^ ].*\)/\1:\2/' )"}}) - _docker_subcommands=3D($_docker_subcommands 'help:Show help for a = command') - _store_cache docker_subcommands _docker_subcommands - fi - _describe -t docker-commands "docker command" _docker_subcommands -} - -__docker_subcommand () { - local -a _command_args - case "$words[1]" in - (attach) - _arguments \ - '--no-stdin[Do not attach stdin]' \ - '--sig-proxy[Proxify all received signal]' \ - ':containers:__docker_runningcontainers' - ;; - (build) - _arguments \ - '--no-cache[Do not use cache when building the image]' \ - '-q[Suppress verbose build output]' \ - '--rm[Remove intermediate containers after a successful bu= ild]' \ - '-t=3D-:repository:__docker_repositories_with_tags' \ - ':path or URL:_directories' - ;; - (commit) - _arguments \ - '--author=3D-[Author]:author: ' \ - '-m=3D-[Commit message]:message: ' \ - '--run=3D-[Configuration automatically applied when the im= age is run]:configuration: ' \ - ':container:__docker_containers' \ - ':repository:__docker_repositories_with_tags' - ;; - (cp) - _arguments \ - ':container:->container' \ - ':hostpath:_files' - case $state in - (container) - if compset -P '*:'; then - _files - else - __docker_containers -qS ":" - fi - ;; - esac - ;; - (diff|export) - _arguments '*:containers:__docker_containers' - ;; - (history) - _arguments \ - '--no-trunc[Do not truncate output]' \ - '-q[Only show numeric IDs]' \ - '*:images:__docker_images' - ;; - (images) - _arguments \ - '-a[Show all images]' \ - '--no-trunc[Do not truncate output]' \ - '-q[Only show numeric IDs]' \ - '--tree[Output graph in tree format]' \ - '--viz[Output graph in graphviz format]' \ - ':repository:__docker_repositories' - ;; - (inspect) - _arguments \ - '--format=3D-[Format the output using the given go templat= e]:template: ' \ - '*:containers:__docker_containers' - ;; - (import) - _arguments \ - ':URL:(- http:// file://)' \ - ':repository:__docker_repositories_with_tags' - ;; - (info) - ;; - (import) - _arguments \ - ':URL:(- http:// file://)' \ - ':repository:__docker_repositories_with_tags' - ;; - (insert) - _arguments '1:containers:__docker_containers' \ - '2:URL:(http:// file://)' \ - '3:file:_files' - ;; - (kill) - _arguments '*:containers:__docker_runningcontainers' - ;; - (load) - ;; - (login) - _arguments \ - '-e=3D-[Email]:email: ' \ - '-p=3D-[Password]:password: ' \ - '-u=3D-[Username]:username: ' \ - ':server: ' - ;; - (logs) - _arguments \ - '-f[Follow log output]' \ - '*:containers:__docker_containers' - ;; - (port) - _arguments \ - '1:containers:__docker_runningcontainers' \ - '2:port:_ports' - ;; - (start) - _arguments \ - '-a[Attach container'"'"'s stdout/stderr and forward all s= ignals]' \ - '-i[Attach container'"'"'s stding]' \ - '*:containers:__docker_stoppedcontainers' - ;; - (rm) - _arguments \ - '--link[Remove the specified link and not the underlying c= ontainer]' \ - '-v[Remove the volumes associated to the container]' \ - '*:containers:__docker_stoppedcontainers' - ;; - (rmi) - _arguments \ - '*:images:__docker_images' - ;; - (restart|stop) - _arguments '-t=3D-[Number of seconds to try to stop for before= killing the container]:seconds to before killing:(1 5 10 30 60)' \ - '*:containers:__docker_runningcontainers' - ;; - (top) - _arguments \ - '1:containers:__docker_runningcontainers' \ - '(-)*:: :->ps-arguments' - case $state in - (ps-arguments) - _ps - ;; - esac - - ;; - (ps) - _arguments \ - '-a[Show all containers]' \ - '--before=3D-[Show only container created before...]:conta= iners:__docker_containers' \ - '-l[Show only the latest created container]' \ - '-n=3D-[Show n last created containers, include non-runnin= g one]:n:(1 5 10 25 50)' \ - '--no-trunc[Do not truncate output]' \ - '-q[Only show numeric IDs]' \ - '-s[Display sizes]' \ - '--since=3D-[Show only containers created since...]:contai= ners:__docker_containers' - ;; - (tag) - _arguments \ - '-f[force]'\ - ':image:__docker_images'\ - ':repository:__docker_repositories_with_tags' - ;; - (run) - _arguments \ - '-P[Publish all exposed ports to the host]' \ - '-a[Attach to stdin, stdout or stderr]' \ - '-c=3D-[CPU shares (relative weight)]:CPU shares:(0 10 100= 200 500 800 1000)' \ - '--cidfile=3D-[Write the container ID to the file]:CID fil= e:_files' \ - '-d[Detached mode: leave the container running in the back= ground]' \ - '*--dns=3D-[Set custom dns servers]:dns server: ' \ - '*-e=3D-[Set environment variables]:environment variable: = ' \ - '--entrypoint=3D-[Overwrite the default entrypoint of the = image]:entry point: ' \ - '*--expose=3D-[Expose a port from the container without pu= blishing it]: ' \ - '-h=3D-[Container host name]:hostname:_hosts' \ - '-i[Keep stdin open even if not attached]' \ - '--link=3D-[Add link to another container]:link:->link' \ - '--lxc-conf=3D-[Add custom lxc options]:lxc options: ' \ - '-m=3D-[Memory limit (in bytes)]:limit: ' \ - '--name=3D-[Container name]:name: ' \ - '*-p=3D-[Expose a container'"'"'s port to the host]:port:_= ports' \ - '--privileged[Give extended privileges to this container]'= \ - '--rm[Remove intermediate containers when it exits]' \ - '--sig-proxy[Proxify all received signal]' \ - '-t[Allocate a pseudo-tty]' \ - '-u=3D-[Username or UID]:user:_users' \ - '*-v=3D-[Bind mount a volume (e.g. from the host: -v /host= :/container, from docker: -v /container)]:volume: '\ - '--volumes-from=3D-[Mount volumes from the specified conta= iner]:volume: ' \ - '-w=3D-[Working directory inside the container]:directory:= _directories' \ - '(-):images:__docker_images' \ - '(-):command: _command_names -e' \ - '*::arguments: _normal' - - case $state in - (link) - if compset -P '*:'; then - _wanted alias expl 'Alias' compadd -E "" - else - __docker_runningcontainers -qS ":" - fi - ;; - esac - - ;; - (pull|search) - _arguments ':name:__docker_search' - ;; - (push) - _arguments ':repository:__docker_repositories_with_tags' - ;; - (save) - _arguments \ - ':images:__docker_images' - ;; - (wait) - _arguments ':containers:__docker_runningcontainers' - ;; - (help) - _arguments ':subcommand:__docker_commands' - ;; - (*) - _message 'Unknown sub command' - esac - -} - -_docker () { - # Support for subservices, which allows for `compdef _docker docker-sh= ell=3D_docker_containers`. - # Based on /usr/share/zsh/functions/Completion/Unix/_git without suppo= rt for `ret`. - if [[ $service !=3D docker ]]; then - _call_function - _$service - return - fi - - local curcontext=3D"$curcontext" state line - typeset -A opt_args - - _arguments -C \ - '-H=3D-[tcp://host:port to bind/connect to]:socket: ' \ - '(-): :->command' \ - '(-)*:: :->option-or-argument' - - if (( CURRENT =3D=3D 1 )); then - - fi - case $state in - (command) - __docker_commands - ;; - (option-or-argument) - curcontext=3D${curcontext%:*:*}:docker-$words[1]: - __docker_subcommand - ;; - esac -} - -_docker "$@" --=20 2.2.0 --6TrnltStXW4iwmi0-- --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUkf8TAAoJEBwe3XzHw6Dd9OgQALd1Yo88lp3wPMZ5FACPcAHa i8+1LreEDN70pKPic4Htd85tU5sxZwyV2YG2og8abKtnvZrM7H+ll/9613fMyULS cz3wxO6R7YQttR4fZ5BOZ1RpoDjAxPNDaZKt0lTOgKOj8rdI5oUnr20B7XThdkgS G+5TWuIVBvYXIwqCIO4AAtRYNCAuFn5IzPCzDUMpPKa86M7p+McVuEgJXWjL4gTh BVyLIW4i5C26uIPqVJhdoQ4KRRJ4XOJEFbEROTS/PA+0hAbBvBt2477aqKAGhBQw ZkOSfwpKLwhOyI/mJJc/FWH/AAtTRFzj/msmWB0owRxZXQ0SFp5qW1mCn3AsM8Zy JCFDR0r8Mt8TFiN1vd3gBV8AfWjQjDoyr/bgqY6LVj1hHWIxy4sYhI2EgwR5jfa5 HCmaE3g/8nARBtWjuGZt+KCuV45AY5KImM80NvctlnhU30XTIbAobrIPFyrEQOUh ZvjRXnO8O6l1lh748d237DMDT3WcJjVsixpfce0zPKqJ/hz+SaKD0qetxOlW+T0S k6lfBOZpAzFec3KtKNE/zzm6THO6sFoo1Ydef6Y4NAARDbLM2WPIJ1pfqdwmk/Bl q7WEt59MK3yDAPecDrOB7NsP7Js0vOKVNK/Y1DCiPfUGsRVv+LYBQQhB3ZFqHCEF PwoYyLN7Nq5sNd8vJp8/ =xuRG -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN--