├── .github ├── CONTRIBUTING.md └── PULL_REQUEST_TEMPLATE.md ├── README.md ├── docker-compose.fish ├── gen_docker_fish_completions.py └── docker.fish /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # ARCHIVED 2 | 3 | I am no longer maintaining this project. Please do not send pull requests. 4 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # ARCHIVED 2 | 3 | I am no longer maintaining this project. Please do not send pull requests. 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Docker fish completion 2 | ====================== 3 | docker command completion for the fish shell. 4 | 5 | - fish = awesome 6 | - docker = awesome 7 | - completion = awesome² 8 | 9 | Installation 10 | ------------ 11 | mkdir ~/.config/fish/completions 12 | wget https://raw.github.com/barnybug/docker-fish-completion/master/docker.fish -O ~/.config/fish/completions/docker.fish 13 | 14 | ### [Fisherman](https://github.com/fisherman/fisherman) 15 | 16 | fisher install barnybug/docker-fish-completion 17 | 18 | fish will show up the new completions straight away, no reload necessary. 19 | 20 | Example 21 | ------- 22 | % docker run -[TAB] 23 | --attach (Attach to stdin, stdout or stderr.) 24 | ... 25 | 26 | % docker run -t -i [TAB] 27 | busybox:latest (Image) 28 | ubuntu:12.04 (Image) 29 | 30 | % docker run -t -i busybox:latest 31 | / # 32 | 33 | Completion supported 34 | -------------------- 35 | - parameters 36 | - commands 37 | - containers 38 | - images 39 | - repositories 40 | 41 | -------------------------------------------------------------------------------- /docker-compose.fish: -------------------------------------------------------------------------------- 1 | # docker-compose.fish - docker completions for fish shell 2 | # 3 | # This file is generated by gen_docker_fish_completions.py from: 4 | # https://github.com/barnybug/docker-fish-completion 5 | # 6 | # To install the completions: 7 | # mkdir -p ~/.config/fish/completions 8 | # cp docker-compose.fish ~/.config/fish/completions 9 | # 10 | # Completion supported: 11 | # - parameters 12 | # - commands 13 | # - services 14 | 15 | function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand' 16 | for i in (commandline -opc) 17 | if contains -- $i build config create down events exec help kill logs pause port ps pull restart rm run scale start stop unpause up version 18 | return 1 19 | end 20 | end 21 | return 0 22 | end 23 | 24 | function __fish_print_docker_compose_services --description 'Print a list of docker-compose services' 25 | docker-compose config --services ^/dev/null | command sort 26 | end 27 | 28 | # common options 29 | complete -c docker-compose -n '__fish_docker_no_subcommand' -s f -l file -d 'Specify an alternate compose file (default: docker-compose.yml)' 30 | complete -c docker-compose -n '__fish_docker_no_subcommand' -s p -l project-name -f -d 'Specify an alternate project name (default: directory name)' 31 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l verbose -f -d 'Show more output' 32 | complete -c docker-compose -n '__fish_docker_no_subcommand' -s v -l version -f -d 'Print version and exit' 33 | complete -c docker-compose -n '__fish_docker_no_subcommand' -s H -l host -f -d 'Daemon socket to connect to' 34 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l tls -f -d 'Use TLS; implied by --tlsverify' 35 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l tlscacert -d 'Trust certs signed only by this CA' 36 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l tlscert -d 'Path to TLS certificate file' 37 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l tlskey -d 'Path to TLS key file' 38 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l tlsverify -f -d 'Use TLS and verify the remote' 39 | complete -c docker-compose -n '__fish_docker_no_subcommand' -l skip-hostname-check -f -d "Don't check the daemon's hostname against the name specified" 40 | 41 | # subcommands 42 | # build 43 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a build -d 'Build or rebuild services' 44 | complete -c docker-compose -A -n '__fish_seen_subcommand_from build' -l force-rm -f -d 'Always remove intermediate containers.' 45 | complete -c docker-compose -A -n '__fish_seen_subcommand_from build' -l no-cache -f -d 'Do not use cache when building the image.' 46 | complete -c docker-compose -A -n '__fish_seen_subcommand_from build' -l pull -f -d 'Always attempt to pull a newer version of the image.' 47 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from build' -a '(__fish_print_docker_compose_services)' -d "Service" 48 | 49 | # config 50 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a config -d 'Validate and view the compose file' 51 | complete -c docker-compose -A -n '__fish_seen_subcommand_from config' -s q -l quiet -f -d "Only validate the configuration, don't print" 52 | complete -c docker-compose -A -n '__fish_seen_subcommand_from config' -l services -f -d 'Print the service names, one per line.' 53 | 54 | # create 55 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a create -d 'Create services' 56 | complete -c docker-compose -A -n '__fish_seen_subcommand_from create' -l force-recreate -f -d 'Recreate containers even if their configuration and' 57 | complete -c docker-compose -A -n '__fish_seen_subcommand_from create' -l no-recreate -f -d "If containers already exist, don't recreate them." 58 | complete -c docker-compose -A -n '__fish_seen_subcommand_from create' -l no-build -f -d "Don't build an image, even if it's missing." 59 | complete -c docker-compose -A -n '__fish_seen_subcommand_from create' -l build -f -d 'Build images before creating containers.' 60 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from create' -a '(__fish_print_docker_compose_services)' -d "Service" 61 | 62 | # down 63 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a down -d 'Stop and remove containers, networks, images, and volumes' 64 | complete -c docker-compose -A -n '__fish_seen_subcommand_from down' -l rmi -f -d "Remove images, type may be one of: 'all' to remove" 65 | complete -c docker-compose -A -n '__fish_seen_subcommand_from down' -s v -l volumes -f -d 'Remove data volumes' 66 | complete -c docker-compose -A -n '__fish_seen_subcommand_from down' -l remove-orphans -f -d 'Remove containers for services not defined in' 67 | 68 | # events 69 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a events -d 'Receive real time events from containers' 70 | complete -c docker-compose -A -n '__fish_seen_subcommand_from events' -l json -f -d 'Output events as a stream of json objects' 71 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from events' -a '(__fish_print_docker_compose_services)' -d "Service" 72 | 73 | # exec 74 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a exec -d 'Execute a command in a running container' 75 | complete -c docker-compose -A -n '__fish_seen_subcommand_from exec' -s d -f -d 'Detached mode: Run command in the background.' 76 | complete -c docker-compose -A -n '__fish_seen_subcommand_from exec' -l privileged -f -d 'Give extended privileges to the process.' 77 | complete -c docker-compose -A -n '__fish_seen_subcommand_from exec' -l user -f -d 'Run the command as this user.' 78 | complete -c docker-compose -A -n '__fish_seen_subcommand_from exec' -s T -f -d 'Disable pseudo-tty allocation. By default `docker-compose exec`' 79 | complete -c docker-compose -A -n '__fish_seen_subcommand_from exec' -l index=index -f -d 'index of the container if there are multiple' 80 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from exec' -a '(__fish_print_docker_compose_services)' -d "Service" 81 | 82 | # help 83 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a help -d 'Get help on a command' 84 | 85 | # kill 86 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a kill -d 'Kill containers' 87 | complete -c docker-compose -A -n '__fish_seen_subcommand_from kill' -s s -f -d 'SIGNAL to send to the container.' 88 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from kill' -a '(__fish_print_docker_compose_services)' -d "Service" 89 | 90 | # logs 91 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a logs -d 'View output from containers' 92 | complete -c docker-compose -A -n '__fish_seen_subcommand_from logs' -l no-color -f -d 'Produce monochrome output.' 93 | complete -c docker-compose -A -n '__fish_seen_subcommand_from logs' -s f -l follow -f -d 'Follow log output.' 94 | complete -c docker-compose -A -n '__fish_seen_subcommand_from logs' -s t -l timestamps -f -d 'Show timestamps.' 95 | complete -c docker-compose -A -n '__fish_seen_subcommand_from logs' -l tail="all" -f -d 'Number of lines to show from the end of the logs' 96 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from logs' -a '(__fish_print_docker_compose_services)' -d "Service" 97 | 98 | # pause 99 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a pause -d 'Pause services' 100 | 101 | # port 102 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a port -d 'Print the public port for a port binding' 103 | complete -c docker-compose -A -n '__fish_seen_subcommand_from port' -l protocol=proto -f -d 'tcp or udp [default: tcp]' 104 | complete -c docker-compose -A -n '__fish_seen_subcommand_from port' -l index=index -f -d 'index of the container if there are multiple' 105 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from port' -a '(__fish_print_docker_compose_services)' -d "Service" 106 | 107 | # ps 108 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a ps -d 'List containers' 109 | complete -c docker-compose -A -n '__fish_seen_subcommand_from ps' -s q -f -d 'Only display IDs' 110 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from ps' -a '(__fish_print_docker_compose_services)' -d "Service" 111 | 112 | # pull 113 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a pull -d 'Pulls service images' 114 | complete -c docker-compose -A -n '__fish_seen_subcommand_from pull' -l ignore-pull-failures -f -d 'Pull what it can and ignores images with pull failures.' 115 | 116 | # restart 117 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a restart -d 'Restart services' 118 | complete -c docker-compose -A -n '__fish_seen_subcommand_from restart' -s t -l timeout -f -d 'Specify a shutdown timeout in seconds.' 119 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from restart' -a '(__fish_print_docker_compose_services)' -d "Service" 120 | 121 | # rm 122 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a rm -d 'Remove stopped containers' 123 | complete -c docker-compose -A -n '__fish_seen_subcommand_from rm' -s f -l force -f -d "Don't ask to confirm removal" 124 | complete -c docker-compose -A -n '__fish_seen_subcommand_from rm' -s v -f -d 'Remove volumes associated with containers' 125 | complete -c docker-compose -A -n '__fish_seen_subcommand_from rm' -s a -l all -f -d 'Also remove one-off containers created by' 126 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from rm' -a '(__fish_print_docker_compose_services)' -d "Service" 127 | 128 | # run 129 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a run -d 'Run a one-off command' 130 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -s d -f -d 'Detached mode: Run container in the background, print' 131 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -l name -f -d 'Assign a name to the container' 132 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -l entrypoint -f -d 'Override the entrypoint of the image.' 133 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -s e -f -d 'Set an environment variable (can be used multiple times)' 134 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -s u -l user="" -f -d 'Run as specified username or uid' 135 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -l no-deps -f -d "Don't start linked services." 136 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -l rm -f -d 'Remove container after run. Ignored in detached mode.' 137 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -s p -l publish=[] -f -d "Publish a container's port(s) to the host" 138 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -l service-ports -f -d "Run command with the service's ports enabled and mapped" 139 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -s T -f -d 'Disable pseudo-tty allocation. By default `docker-compose run`' 140 | complete -c docker-compose -A -n '__fish_seen_subcommand_from run' -s w -l workdir="" -f -d 'Working directory inside the container' 141 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from run' -a '(__fish_print_docker_compose_services)' -d "Service" 142 | 143 | # scale 144 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a scale -d 'Set number of containers for a service' 145 | complete -c docker-compose -A -n '__fish_seen_subcommand_from scale' -s t -l timeout -f -d 'Specify a shutdown timeout in seconds.' 146 | 147 | # start 148 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a start -d 'Start services' 149 | 150 | # stop 151 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a stop -d 'Stop services' 152 | complete -c docker-compose -A -n '__fish_seen_subcommand_from stop' -s t -l timeout -f -d 'Specify a shutdown timeout in seconds.' 153 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from stop' -a '(__fish_print_docker_compose_services)' -d "Service" 154 | 155 | # unpause 156 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause services' 157 | 158 | # up 159 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a up -d 'Create and start containers' 160 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -s d -f -d 'Detached mode: Run containers in the background,' 161 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l no-color -f -d 'Produce monochrome output.' 162 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l no-deps -f -d "Don't start linked services." 163 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l force-recreate -f -d 'Recreate containers even if their configuration' 164 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l no-recreate -f -d "If containers already exist, don't recreate them." 165 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l no-build -f -d "Don't build an image, even if it's missing." 166 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l build -f -d 'Build images before starting containers.' 167 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l abort-on-container-exit -f -d 'Stops all containers if any container was stopped.' 168 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -s t -l timeout -f -d 'Use this timeout in seconds for container shutdown' 169 | complete -c docker-compose -A -n '__fish_seen_subcommand_from up' -l remove-orphans -f -d 'Remove containers for services not' 170 | complete -c docker-compose -A -f -n '__fish_seen_subcommand_from up' -a '(__fish_print_docker_compose_services)' -d "Service" 171 | 172 | # version 173 | complete -c docker-compose -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker-Compose version information' 174 | complete -c docker-compose -A -n '__fish_seen_subcommand_from version' -l short -f -d "Shows only Compose's version number." 175 | 176 | 177 | -------------------------------------------------------------------------------- /gen_docker_fish_completions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import subprocess 3 | import re 4 | import os 5 | from argparse import ArgumentParser 6 | 7 | 8 | class Subcommand(object): 9 | def __init__(self, command, description, args, switches): 10 | self.command = command 11 | self.description = description 12 | self.args = args 13 | self.switches = switches 14 | 15 | 16 | class Switch(object): 17 | def __init__(self, shorts, longs, description, metavar): 18 | self.shorts = shorts 19 | self.longs = longs 20 | self.description = description 21 | self.metavar = metavar 22 | 23 | def is_file_target(self): 24 | if not self.metavar: 25 | return False 26 | return self.metavar == 'FILE' or 'PATH' in self.metavar 27 | 28 | @property 29 | def fish_completion(self): 30 | complete_arg_spec = ['-s %s' % x for x in self.shorts] 31 | complete_arg_spec += ['-l %s' % x for x in self.longs] 32 | if not self.is_file_target(): 33 | complete_arg_spec.append('-f') 34 | desc = repr(self.description) 35 | return '''{0} -d {1}'''.format(' '.join(complete_arg_spec), desc) 36 | 37 | 38 | class DockerCmdLine(object): 39 | binary = 'docker' 40 | 41 | def __init__(self, docker_path): 42 | self.docker_path = docker_path 43 | 44 | def get_output(self, *args): 45 | cmd = [os.path.join(self.docker_path, self.binary)] + list(args) 46 | # docker returns non-zero exit code for some help commands so can't use subprocess.check_output here 47 | ps = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 48 | out, _ = ps.communicate() 49 | out = out.decode('utf-8') 50 | return iter(out.splitlines()) 51 | 52 | def parse_switch(self, line): 53 | line = line.strip() 54 | if ' ' not in line: 55 | # ignore continuation lines 56 | return None 57 | opt, description = re.split(' +', line, 1) 58 | switches = opt.split(', ') 59 | metavar = None 60 | # handle arguments with metavar 61 | # Options: 62 | # -f, --file FILE 63 | for i, switch in enumerate(switches): 64 | if ' ' in switch: 65 | switches[i], metavar = switch.split(' ') 66 | shorts = [x[1:] for x in switches if not x.startswith('--')] 67 | longs = [x[2:] for x in switches if x.startswith('--')] 68 | return Switch(shorts, longs, description, metavar) 69 | 70 | def common_options(self): 71 | lines = self.get_output('-h') 72 | # skip header 73 | while next(lines) != 'Options:': 74 | pass 75 | 76 | for line in lines: 77 | if line == 'Commands:': 78 | break 79 | switch = self.parse_switch(line) 80 | if switch: 81 | yield switch 82 | 83 | def subcommands(self): 84 | lines = self.get_output('help') 85 | while next(lines) != 'Commands:': 86 | pass 87 | 88 | for line in lines: 89 | if not line: 90 | break 91 | command, description = line.strip().split(None, 1) 92 | yield self.subcommand(command, description) 93 | 94 | def subcommand(self, command, description): 95 | lines = self.get_output('help', command) 96 | usage = None 97 | for line in lines: 98 | if line.startswith('Usage:'): 99 | usage = line 100 | break 101 | else: 102 | raise RuntimeError( 103 | "Can't find Usage in command: %r" % command 104 | ) 105 | args = usage.split()[3:] 106 | if args and args[0].upper() == '[OPTIONS]': 107 | args = args[1:] 108 | if command in ('push', 'pull'): 109 | # improve completion for docker push/pull 110 | args = ['REPOSITORY|IMAGE'] 111 | elif command == 'images': 112 | args = ['REPOSITORY'] 113 | switches = [] 114 | for line in lines: 115 | if not line.strip().startswith('-'): 116 | continue 117 | switches.append(self.parse_switch(line)) 118 | return Subcommand(command, description, args, switches) 119 | 120 | 121 | class DockerComposeCmdLine(DockerCmdLine): 122 | binary = 'docker-compose' 123 | 124 | 125 | class BaseFishGenerator(object): 126 | header_text = '' 127 | 128 | def __init__(self, docker): 129 | self.docker = docker 130 | 131 | # Generate fish completions definitions for docker 132 | def generate(self): 133 | self.header() 134 | self.common_options() 135 | self.subcommands() 136 | 137 | def header(self): 138 | cmds = sorted(sub.command for sub in self.docker.subcommands()) 139 | print(self.header_text.lstrip() % ' '.join(cmds)) 140 | 141 | def common_options(self): 142 | print('# common options') 143 | for switch in self.docker.common_options(): 144 | print('''complete -c {binary} -n '__fish_docker_no_subcommand' {completion}'''.format( 145 | binary=self.docker.binary, 146 | completion=switch.fish_completion)) 147 | print() 148 | 149 | def subcommands(self): 150 | print('# subcommands') 151 | for sub in self.docker.subcommands(): 152 | print('# %s' % sub.command) 153 | desc = repr(sub.description) 154 | print('''complete -c {binary} -f -n '__fish_docker_no_subcommand' -a {command} -d {desc}'''.format( 155 | binary=self.docker.binary, 156 | command=sub.command, 157 | desc=desc)) 158 | for switch in sub.switches: 159 | print('''complete -c {binary} -A -n '__fish_seen_subcommand_from {command}' {completion}'''.format( 160 | binary=self.docker.binary, 161 | command=sub.command, 162 | completion=switch.fish_completion)) 163 | 164 | # standalone arguments 165 | unique = set() 166 | for args in sub.args: 167 | m = re.match(r'\[(.+)\.\.\.\]', args) 168 | if m: 169 | # optional arguments 170 | args = m.group(1) 171 | unique.update(args.split('|')) 172 | for arg in sorted(unique): 173 | self.process_subcommand_arg(sub, arg) 174 | print() 175 | print() 176 | 177 | def process_subcommand_arg(self, sub, arg): 178 | pass 179 | 180 | 181 | class DockerFishGenerator(BaseFishGenerator): 182 | header_text = """ 183 | # docker.fish - docker completions for fish shell 184 | # 185 | # This file is generated by gen_docker_fish_completions.py from: 186 | # https://github.com/barnybug/docker-fish-completion 187 | # 188 | # To install the completions: 189 | # mkdir -p ~/.config/fish/completions 190 | # cp docker.fish ~/.config/fish/completions 191 | # 192 | # Completion supported: 193 | # - parameters 194 | # - commands 195 | # - containers 196 | # - images 197 | # - repositories 198 | 199 | function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand' 200 | for i in (commandline -opc) 201 | if contains -- $i %s 202 | return 1 203 | end 204 | end 205 | return 0 206 | end 207 | 208 | function __fish_print_docker_containers --description 'Print a list of docker containers' -a select 209 | switch $select 210 | case running 211 | docker ps --no-trunc --filter status=running --format '{{.ID}}\\n{{.Names}}' | tr ',' '\\n' 212 | case stopped 213 | docker ps --no-trunc --filter status=exited --filter status=created --format '{{.ID}}\\n{{.Names}}' | tr ',' '\\n' 214 | case all 215 | docker ps --no-trunc --all --format '{{.ID}}\\n{{.Names}}' | tr ',' '\\n' 216 | end 217 | end 218 | 219 | function __fish_print_docker_images --description 'Print a list of docker images' 220 | docker images --format '{{if eq .Repository ""}}{{.ID}}\\tUnnamed Image{{else}}{{.Repository}}:{{.Tag}}{{end}}' 221 | end 222 | 223 | function __fish_print_docker_repositories --description 'Print a list of docker repositories' 224 | docker images --format '{{.Repository}}' | command grep -v '' | command sort | command uniq 225 | end 226 | """ 227 | 228 | def process_subcommand_arg(self, sub, arg): 229 | if arg == 'CONTAINER' or arg == '[CONTAINER...]': 230 | if sub.command in ('start', 'rm'): 231 | select = 'stopped' 232 | elif sub.command in ('commit', 'diff', 'export', 'inspect'): 233 | select = 'all' 234 | else: 235 | select = 'running' 236 | print('''complete -c docker -A -f -n '__fish_seen_subcommand_from {0}' -a '(__fish_print_docker_containers {1})' -d "Container"'''.format(sub.command, select)) 237 | elif arg == 'IMAGE': 238 | print('''complete -c docker -A -f -n '__fish_seen_subcommand_from {0}' -a '(__fish_print_docker_images)' -d "Image"'''.format(sub.command)) 239 | elif arg == 'REPOSITORY': 240 | print('''complete -c docker -A -f -n '__fish_seen_subcommand_from {0}' -a '(__fish_print_docker_repositories)' -d "Repository"'''.format(sub.command)) 241 | 242 | 243 | class DockerComposeFishGenerator(BaseFishGenerator): 244 | header_text = """ 245 | # docker-compose.fish - docker completions for fish shell 246 | # 247 | # This file is generated by gen_docker_fish_completions.py from: 248 | # https://github.com/barnybug/docker-fish-completion 249 | # 250 | # To install the completions: 251 | # mkdir -p ~/.config/fish/completions 252 | # cp docker-compose.fish ~/.config/fish/completions 253 | # 254 | # Completion supported: 255 | # - parameters 256 | # - commands 257 | # - services 258 | 259 | function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand' 260 | for i in (commandline -opc) 261 | if contains -- $i %s 262 | return 1 263 | end 264 | end 265 | return 0 266 | end 267 | 268 | function __fish_print_docker_compose_services --description 'Print a list of docker-compose services' 269 | docker-compose config --services ^/dev/null | command sort 270 | end 271 | """ 272 | 273 | def process_subcommand_arg(self, sub, arg): 274 | if arg in ('SERVICE', '[SERVICE...]'): 275 | print('''complete -c docker-compose -A -f -n '__fish_seen_subcommand_from {0}' -a '(__fish_print_docker_compose_services)' -d "Service"'''.format(sub.command)) 276 | 277 | 278 | 279 | def main(): 280 | parser = ArgumentParser() 281 | parser.add_argument( 282 | 'binary', 283 | choices=('docker', 'docker-compose') 284 | ) 285 | parser.add_argument( 286 | '--docker-path', 287 | default='/usr/bin' 288 | ) 289 | 290 | args = parser.parse_args() 291 | 292 | if args.binary == 'docker': 293 | DockerFishGenerator(DockerCmdLine(args.docker_path)).generate() 294 | else: 295 | DockerComposeFishGenerator(DockerComposeCmdLine(args.docker_path)).generate() 296 | 297 | if __name__ == '__main__': 298 | main() 299 | 300 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'attach' --description "Attach to a running container" 301 | # complete -f -n '__fish_seen_subcommand_from attach' -c docker -l no-stdin --description "Do not attach stdin" 302 | # complete -f -n '__fish_seen_subcommand_from attach' -c docker -l sig-proxy --description "Proxify all received signal to the process (even in non-tty mode)" 303 | 304 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'build' --description "Build a container from a Dockerfile" 305 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'commit' --description "Create a new image from a container's changes" 306 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'cp' --description "Copy files/folders from the containers filesystem to the host path" 307 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'diff' --description "Inspect changes on a container's filesystem" 308 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'events' --description "Get real time events from the server" 309 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'export' --description "Stream the contents of a container as a tar archive" 310 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'history' --description "Show the history of an image" 311 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'images' --description "List images" 312 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'import' --description "Create a new filesystem image from the contents of a tarball" 313 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'info' --description "Display system-wide information" 314 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'insert' --description "Insert a file in an image" 315 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'inspect' --description "Return low-level information on a container" 316 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'kill' --description "Kill a running container" 317 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'load' --description "Load an image from a tar archive" 318 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'login' --description "Register or Login to the docker registry server" 319 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'logs' --description "Fetch the logs of a container" 320 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'port' --description "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT" 321 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'ps' --description "List containers" 322 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'pull' --description "Pull an image or a repository from the docker registry server" 323 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'push' --description "Push an image or a repository to the docker registry server" 324 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'restart' --description "Restart a running container" 325 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'rm' --description "Remove one or more containers" 326 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'rmi' --description "Remove one or more images" 327 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'run' --description "Run a command in a new container" 328 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'save' --description "Save an image to a tar archive" 329 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'search' --description "Search for an image in the docker index" 330 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'start' --description "Start a stopped container" 331 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'stop' --description "Stop a running container" 332 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'tag' --description "Tag an image into a repository" 333 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'top' --description "Lookup the running processes of a container" 334 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'version' --description "Show the docker version information" 335 | # complete -f -n '__fish_docker_no_subcommand' -c docker -a 'wait' --description "Block until a container stops, then print its exit code" 336 | -------------------------------------------------------------------------------- /docker.fish: -------------------------------------------------------------------------------- 1 | # docker.fish - docker completions for fish shell 2 | # 3 | # This file is generated by gen_docker_fish_completions.py from: 4 | # https://github.com/barnybug/docker-fish-completion 5 | # 6 | # To install the completions: 7 | # mkdir -p ~/.config/fish/completions 8 | # cp docker.fish ~/.config/fish/completions 9 | # 10 | # Completion supported: 11 | # - parameters 12 | # - commands 13 | # - containers 14 | # - images 15 | # - repositories 16 | 17 | function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand' 18 | for i in (commandline -opc) 19 | if contains -- $i attach build commit cp create diff events exec export history images import info inspect kill load login logout logs network pause port ps pull push rename restart rm rmi run save search start stats stop tag top unpause update version volume wait 20 | return 1 21 | end 22 | end 23 | return 0 24 | end 25 | 26 | function __fish_print_docker_containers --description 'Print a list of docker containers' -a select 27 | switch $select 28 | case running 29 | docker ps --no-trunc --filter status=running --format '{{.ID}}\n{{.Names}}' | tr ',' '\n' 30 | case stopped 31 | docker ps --no-trunc --filter status=exited --filter status=created --format '{{.ID}}\\n{{.Names}}' | tr ',' '\\n' 32 | case all 33 | docker ps --no-trunc --all --format '{{.ID}}\n{{.Names}}' | tr ',' '\n' 34 | end 35 | end 36 | 37 | function __fish_print_docker_images --description 'Print a list of docker images' 38 | docker images --format '{{.Repository}}:{{.Tag}}' -f 'dangling=false' | command sort | command uniq 39 | end 40 | 41 | function __fish_print_docker_repositories --description 'Print a list of docker repositories' 42 | docker images --format '{{.Repository}}' -f 'dangling=false' | command sort | command uniq 43 | end 44 | 45 | # common options 46 | complete -c docker -n '__fish_docker_no_subcommand' -l config=~/.docker -f -d 'Location of client config files' 47 | complete -c docker -n '__fish_docker_no_subcommand' -s D -l debug -f -d 'Enable debug mode' 48 | complete -c docker -n '__fish_docker_no_subcommand' -s H -l host=[] -f -d 'Daemon socket(s) to connect to' 49 | complete -c docker -n '__fish_docker_no_subcommand' -s h -l help -f -d 'Print usage' 50 | complete -c docker -n '__fish_docker_no_subcommand' -s l -l log-level=info -f -d 'Set the logging level' 51 | complete -c docker -n '__fish_docker_no_subcommand' -l tls -f -d 'Use TLS; implied by --tlsverify' 52 | complete -c docker -n '__fish_docker_no_subcommand' -l tlscacert=~/.docker/ca.pem -f -d 'Trust certs signed only by this CA' 53 | complete -c docker -n '__fish_docker_no_subcommand' -l tlscert=~/.docker/cert.pem -f -d 'Path to TLS certificate file' 54 | complete -c docker -n '__fish_docker_no_subcommand' -l tlskey=~/.docker/key.pem -f -d 'Path to TLS key file' 55 | complete -c docker -n '__fish_docker_no_subcommand' -l tlsverify -f -d 'Use TLS and verify the remote' 56 | complete -c docker -n '__fish_docker_no_subcommand' -s v -l version -f -d 'Print version information and quit' 57 | 58 | # subcommands 59 | # attach 60 | complete -c docker -f -n '__fish_docker_no_subcommand' -a attach -d 'Attach to a running container' 61 | complete -c docker -A -n '__fish_seen_subcommand_from attach' -l detach-keys -f -d 'Override the key sequence for detaching a container' 62 | complete -c docker -A -n '__fish_seen_subcommand_from attach' -l help -f -d 'Print usage' 63 | complete -c docker -A -n '__fish_seen_subcommand_from attach' -l no-stdin -f -d 'Do not attach STDIN' 64 | complete -c docker -A -n '__fish_seen_subcommand_from attach' -l sig-proxy=true -f -d 'Proxy all received signals to the process' 65 | complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_print_docker_containers running)' -d "Container" 66 | 67 | # build 68 | complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile' 69 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l build-arg=[] -f -d 'Set build-time variables' 70 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l cpu-shares -f -d 'CPU shares (relative weight)' 71 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l cgroup-parent -f -d 'Optional parent cgroup for the container' 72 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l cpu-period -f -d 'Limit the CPU CFS (Completely Fair Scheduler) period' 73 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l cpu-quota -f -d 'Limit the CPU CFS (Completely Fair Scheduler) quota' 74 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l cpuset-cpus -f -d 'CPUs in which to allow execution (0-3, 0,1)' 75 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l cpuset-mems -f -d 'MEMs in which to allow execution (0-3, 0,1)' 76 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l disable-content-trust=true -f -d 'Skip image verification' 77 | complete -c docker -A -n '__fish_seen_subcommand_from build' -s f -l file -f -d "Name of the Dockerfile (Default is 'PATH/Dockerfile')" 78 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l force-rm -f -d 'Always remove intermediate containers' 79 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l help -f -d 'Print usage' 80 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l isolation -f -d 'Container isolation technology' 81 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l label=[] -f -d 'Set metadata for an image' 82 | complete -c docker -A -n '__fish_seen_subcommand_from build' -s m -l memory -f -d 'Memory limit' 83 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l memory-swap -f -d "Swap limit equal to memory plus swap: '-1' to enable unlimited swap" 84 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l no-cache -f -d 'Do not use cache when building the image' 85 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l pull -f -d 'Always attempt to pull a newer version of the image' 86 | complete -c docker -A -n '__fish_seen_subcommand_from build' -s q -l quiet -f -d 'Suppress the build output and print image ID on success' 87 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l rm=true -f -d 'Remove intermediate containers after a successful build' 88 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l shm-size -f -d 'Size of /dev/shm, default value is 64MB' 89 | complete -c docker -A -n '__fish_seen_subcommand_from build' -s t -l tag=[] -f -d "Name and optionally a tag in the 'name:tag' format" 90 | complete -c docker -A -n '__fish_seen_subcommand_from build' -l ulimit=[] -f -d 'Ulimit options' 91 | 92 | # commit 93 | complete -c docker -f -n '__fish_docker_no_subcommand' -a commit -d "Create a new image from a container's changes" 94 | complete -c docker -A -n '__fish_seen_subcommand_from commit' -s a -l author -f -d 'Author (e.g., "John Hannibal Smith ")' 95 | complete -c docker -A -n '__fish_seen_subcommand_from commit' -s c -l change=[] -f -d 'Apply Dockerfile instruction to the created image' 96 | complete -c docker -A -n '__fish_seen_subcommand_from commit' -l help -f -d 'Print usage' 97 | complete -c docker -A -n '__fish_seen_subcommand_from commit' -s m -l message -f -d 'Commit message' 98 | complete -c docker -A -n '__fish_seen_subcommand_from commit' -s p -l pause=true -f -d 'Pause container during commit' 99 | complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -a '(__fish_print_docker_containers all)' -d "Container" 100 | 101 | # cp 102 | complete -c docker -f -n '__fish_docker_no_subcommand' -a cp -d 'Copy files/folders between a container and the local filesystem' 103 | complete -c docker -A -n '__fish_seen_subcommand_from cp' -l help -f -d 'Print usage' 104 | complete -c docker -A -n '__fish_seen_subcommand_from cp' -s L -l follow-link -f -d 'Always follow symbol link in SRC_PATH' 105 | 106 | # create 107 | complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container' 108 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s a -l attach=[] -f -d 'Attach to STDIN, STDOUT or STDERR' 109 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l add-host=[] -f -d 'Add a custom host-to-IP mapping (host:ip)' 110 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l blkio-weight -f -d 'Block IO (relative weight), between 10 and 1000' 111 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l blkio-weight-device=[] -f -d 'Block IO weight (relative device weight)' 112 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cpu-shares -f -d 'CPU shares (relative weight)' 113 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cap-add=[] -f -d 'Add Linux capabilities' 114 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cap-drop=[] -f -d 'Drop Linux capabilities' 115 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cgroup-parent -f -d 'Optional parent cgroup for the container' 116 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cidfile -f -d 'Write the container ID to the file' 117 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cpu-period -f -d 'Limit CPU CFS (Completely Fair Scheduler) period' 118 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cpu-quota -f -d 'Limit CPU CFS (Completely Fair Scheduler) quota' 119 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cpuset-cpus -f -d 'CPUs in which to allow execution (0-3, 0,1)' 120 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l cpuset-mems -f -d 'MEMs in which to allow execution (0-3, 0,1)' 121 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l device=[] -f -d 'Add a host device to the container' 122 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l device-read-bps=[] -f -d 'Limit read rate (bytes per second) from a device' 123 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l device-read-iops=[] -f -d 'Limit read rate (IO per second) from a device' 124 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l device-write-bps=[] -f -d 'Limit write rate (bytes per second) to a device' 125 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l device-write-iops=[] -f -d 'Limit write rate (IO per second) to a device' 126 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l disable-content-trust=true -f -d 'Skip image verification' 127 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l dns=[] -f -d 'Set custom DNS servers' 128 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l dns-opt=[] -f -d 'Set DNS options' 129 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l dns-search=[] -f -d 'Set custom DNS search domains' 130 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s e -l env=[] -f -d 'Set environment variables' 131 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l entrypoint -f -d 'Overwrite the default ENTRYPOINT of the image' 132 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l env-file=[] -f -d 'Read in a file of environment variables' 133 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l expose=[] -f -d 'Expose a port or a range of ports' 134 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l group-add=[] -f -d 'Add additional groups to join' 135 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s h -l hostname -f -d 'Container host name' 136 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l help -f -d 'Print usage' 137 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s i -l interactive -f -d 'Keep STDIN open even if not attached' 138 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l ip -f -d 'Container IPv4 address (e.g. 172.30.100.104)' 139 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l ip6 -f -d 'Container IPv6 address (e.g. 2001:db8::33)' 140 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l ipc -f -d 'IPC namespace to use' 141 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l isolation -f -d 'Container isolation technology' 142 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l kernel-memory -f -d 'Kernel memory limit' 143 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s l -l label=[] -f -d 'Set meta data on a container' 144 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l label-file=[] -f -d 'Read in a line delimited file of labels' 145 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l link=[] -f -d 'Add link to another container' 146 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l log-driver -f -d 'Logging driver for container' 147 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l log-opt=[] -f -d 'Log driver options' 148 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s m -l memory -f -d 'Memory limit' 149 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l mac-address -f -d 'Container MAC address (e.g. 92:d0:c6:0a:29:33)' 150 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l memory-reservation -f -d 'Memory soft limit' 151 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l memory-swap -f -d "Swap limit equal to memory plus swap: '-1' to enable unlimited swap" 152 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l memory-swappiness=-1 -f -d 'Tune container memory swappiness (0 to 100)' 153 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l name -f -d 'Assign a name to the container' 154 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l net=default -f -d 'Connect a container to a network' 155 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l net-alias=[] -f -d 'Add network-scoped alias for the container' 156 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l oom-kill-disable -f -d 'Disable OOM Killer' 157 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l oom-score-adj -f -d "Tune host's OOM preferences (-1000 to 1000)" 158 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s P -l publish-all -f -d 'Publish all exposed ports to random ports' 159 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s p -l publish=[] -f -d "Publish a container's port(s) to the host" 160 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l pid -f -d 'PID namespace to use' 161 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l pids-limit -f -d 'Tune container pids limit (set -1 for unlimited)' 162 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l privileged -f -d 'Give extended privileges to this container' 163 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l read-only -f -d "Mount the container's root filesystem as read only" 164 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l restart=no -f -d 'Restart policy to apply when a container exits' 165 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l security-opt=[] -f -d 'Security Options' 166 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l shm-size -f -d 'Size of /dev/shm, default value is 64MB' 167 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l stop-signal=SIGTERM -f -d 'Signal to stop a container, SIGTERM by default' 168 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s t -l tty -f -d 'Allocate a pseudo-TTY' 169 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l tmpfs=[] -f -d 'Mount a tmpfs directory' 170 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s u -l user -f -d 'Username or UID (format: [:])' 171 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l ulimit=[] -f -d 'Ulimit options' 172 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l userns -f -d 'User namespace to use' 173 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l uts -f -d 'UTS namespace to use' 174 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s v -l volume=[] -f -d 'Bind mount a volume' 175 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l volume-driver -f -d 'Optional volume driver for the container' 176 | complete -c docker -A -n '__fish_seen_subcommand_from create' -l volumes-from=[] -f -d 'Mount volumes from the specified container(s)' 177 | complete -c docker -A -n '__fish_seen_subcommand_from create' -s w -l workdir -f -d 'Working directory inside the container' 178 | complete -c docker -A -f -n '__fish_seen_subcommand_from create' -a '(__fish_print_docker_images)' -d "Image" 179 | 180 | # diff 181 | complete -c docker -f -n '__fish_docker_no_subcommand' -a diff -d "Inspect changes on a container's filesystem" 182 | complete -c docker -A -n '__fish_seen_subcommand_from diff' -l help -f -d 'Print usage' 183 | complete -c docker -A -f -n '__fish_seen_subcommand_from diff' -a '(__fish_print_docker_containers all)' -d "Container" 184 | 185 | # events 186 | complete -c docker -f -n '__fish_docker_no_subcommand' -a events -d 'Get real time events from the server' 187 | complete -c docker -A -n '__fish_seen_subcommand_from events' -s f -l filter=[] -f -d 'Filter output based on conditions provided' 188 | complete -c docker -A -n '__fish_seen_subcommand_from events' -l help -f -d 'Print usage' 189 | complete -c docker -A -n '__fish_seen_subcommand_from events' -l since -f -d 'Show all events created since timestamp' 190 | complete -c docker -A -n '__fish_seen_subcommand_from events' -l until -f -d 'Stream events until this timestamp' 191 | 192 | # exec 193 | complete -c docker -f -n '__fish_docker_no_subcommand' -a exec -d 'Run a command in a running container' 194 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -s d -l detach -f -d 'Detached mode: run command in the background' 195 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -l detach-keys -f -d 'Override the key sequence for detaching a container' 196 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -l help -f -d 'Print usage' 197 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -s i -l interactive -f -d 'Keep STDIN open even if not attached' 198 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -l privileged -f -d 'Give extended privileges to the command' 199 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -s t -l tty -f -d 'Allocate a pseudo-TTY' 200 | complete -c docker -A -n '__fish_seen_subcommand_from exec' -s u -l user -f -d 'Username or UID (format: [:])' 201 | complete -c docker -A -f -n '__fish_seen_subcommand_from exec' -a '(__fish_print_docker_containers running)' -d "Container" 202 | 203 | # export 204 | complete -c docker -f -n '__fish_docker_no_subcommand' -a export -d "Export a container's filesystem as a tar archive" 205 | complete -c docker -A -n '__fish_seen_subcommand_from export' -l help -f -d 'Print usage' 206 | complete -c docker -A -n '__fish_seen_subcommand_from export' -s o -l output -f -d 'Write to a file, instead of STDOUT' 207 | complete -c docker -A -f -n '__fish_seen_subcommand_from export' -a '(__fish_print_docker_containers all)' -d "Container" 208 | 209 | # history 210 | complete -c docker -f -n '__fish_docker_no_subcommand' -a history -d 'Show the history of an image' 211 | complete -c docker -A -n '__fish_seen_subcommand_from history' -s H -l human=true -f -d 'Print sizes and dates in human readable format' 212 | complete -c docker -A -n '__fish_seen_subcommand_from history' -l help -f -d 'Print usage' 213 | complete -c docker -A -n '__fish_seen_subcommand_from history' -l no-trunc -f -d "Don't truncate output" 214 | complete -c docker -A -n '__fish_seen_subcommand_from history' -s q -l quiet -f -d 'Only show numeric IDs' 215 | complete -c docker -A -f -n '__fish_seen_subcommand_from history' -a '(__fish_print_docker_images)' -d "Image" 216 | 217 | # images 218 | complete -c docker -f -n '__fish_docker_no_subcommand' -a images -d 'List images' 219 | complete -c docker -A -n '__fish_seen_subcommand_from images' -s a -l all -f -d 'Show all images (default hides intermediate images)' 220 | complete -c docker -A -n '__fish_seen_subcommand_from images' -l digests -f -d 'Show digests' 221 | complete -c docker -A -n '__fish_seen_subcommand_from images' -s f -l filter=[] -f -d 'Filter output based on conditions provided' 222 | complete -c docker -A -n '__fish_seen_subcommand_from images' -l format -f -d 'Pretty-print images using a Go template' 223 | complete -c docker -A -n '__fish_seen_subcommand_from images' -l help -f -d 'Print usage' 224 | complete -c docker -A -n '__fish_seen_subcommand_from images' -l no-trunc -f -d "Don't truncate output" 225 | complete -c docker -A -n '__fish_seen_subcommand_from images' -s q -l quiet -f -d 'Only show numeric IDs' 226 | complete -c docker -A -f -n '__fish_seen_subcommand_from images' -a '(__fish_print_docker_repositories)' -d "Repository" 227 | 228 | # import 229 | complete -c docker -f -n '__fish_docker_no_subcommand' -a import -d 'Import the contents from a tarball to create a filesystem image' 230 | complete -c docker -A -n '__fish_seen_subcommand_from import' -s c -l change=[] -f -d 'Apply Dockerfile instruction to the created image' 231 | complete -c docker -A -n '__fish_seen_subcommand_from import' -l help -f -d 'Print usage' 232 | complete -c docker -A -n '__fish_seen_subcommand_from import' -s m -l message -f -d 'Set commit message for imported image' 233 | 234 | # info 235 | complete -c docker -f -n '__fish_docker_no_subcommand' -a info -d 'Display system-wide information' 236 | complete -c docker -A -n '__fish_seen_subcommand_from info' -l help -f -d 'Print usage' 237 | 238 | # inspect 239 | complete -c docker -f -n '__fish_docker_no_subcommand' -a inspect -d 'Return low-level information on a container or image' 240 | complete -c docker -A -n '__fish_seen_subcommand_from inspect' -s f -l format -f -d 'Format the output using the given go template' 241 | complete -c docker -A -n '__fish_seen_subcommand_from inspect' -l help -f -d 'Print usage' 242 | complete -c docker -A -n '__fish_seen_subcommand_from inspect' -s s -l size -f -d 'Display total file sizes if the type is container' 243 | complete -c docker -A -n '__fish_seen_subcommand_from inspect' -l type -f -d 'Return JSON for specified type, (e.g image or container)' 244 | complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_containers all)' -d "Container" 245 | complete -c docker -A -f -n '__fish_seen_subcommand_from inspect' -a '(__fish_print_docker_images)' -d "Image" 246 | 247 | # kill 248 | complete -c docker -f -n '__fish_docker_no_subcommand' -a kill -d 'Kill a running container' 249 | complete -c docker -A -n '__fish_seen_subcommand_from kill' -l help -f -d 'Print usage' 250 | complete -c docker -A -n '__fish_seen_subcommand_from kill' -s s -l signal=KILL -f -d 'Signal to send to the container' 251 | complete -c docker -A -f -n '__fish_seen_subcommand_from kill' -a '(__fish_print_docker_containers running)' -d "Container" 252 | 253 | # load 254 | complete -c docker -f -n '__fish_docker_no_subcommand' -a load -d 'Load an image from a tar archive or STDIN' 255 | complete -c docker -A -n '__fish_seen_subcommand_from load' -l help -f -d 'Print usage' 256 | complete -c docker -A -n '__fish_seen_subcommand_from load' -s i -l input -f -d 'Read from a tar archive file, instead of STDIN' 257 | complete -c docker -A -n '__fish_seen_subcommand_from load' -s q -l quiet -f -d 'Suppress the load output' 258 | 259 | # login 260 | complete -c docker -f -n '__fish_docker_no_subcommand' -a login -d 'Log in to a Docker registry' 261 | complete -c docker -A -n '__fish_seen_subcommand_from login' -l help -f -d 'Print usage' 262 | complete -c docker -A -n '__fish_seen_subcommand_from login' -s p -l password -f -d 'Password' 263 | complete -c docker -A -n '__fish_seen_subcommand_from login' -s u -l username -f -d 'Username' 264 | 265 | # logout 266 | complete -c docker -f -n '__fish_docker_no_subcommand' -a logout -d 'Log out from a Docker registry' 267 | complete -c docker -A -n '__fish_seen_subcommand_from logout' -l help -f -d 'Print usage' 268 | 269 | # logs 270 | complete -c docker -f -n '__fish_docker_no_subcommand' -a logs -d 'Fetch the logs of a container' 271 | complete -c docker -A -n '__fish_seen_subcommand_from logs' -s f -l follow -f -d 'Follow log output' 272 | complete -c docker -A -n '__fish_seen_subcommand_from logs' -l help -f -d 'Print usage' 273 | complete -c docker -A -n '__fish_seen_subcommand_from logs' -l since -f -d 'Show logs since timestamp' 274 | complete -c docker -A -n '__fish_seen_subcommand_from logs' -s t -l timestamps -f -d 'Show timestamps' 275 | complete -c docker -A -n '__fish_seen_subcommand_from logs' -l tail=all -f -d 'Number of lines to show from the end of the logs' 276 | complete -c docker -A -f -n '__fish_seen_subcommand_from logs' -a '(__fish_print_docker_containers all)' -d "Container" 277 | 278 | # network 279 | complete -c docker -f -n '__fish_docker_no_subcommand' -a network -d 'Manage Docker networks' 280 | complete -c docker -A -n '__fish_seen_subcommand_from network' -l help -f -d 'Print usage' 281 | 282 | # pause 283 | complete -c docker -f -n '__fish_docker_no_subcommand' -a pause -d 'Pause all processes within a container' 284 | complete -c docker -A -n '__fish_seen_subcommand_from pause' -l help -f -d 'Print usage' 285 | complete -c docker -A -f -n '__fish_seen_subcommand_from pause' -a '(__fish_print_docker_containers running)' -d "Container" 286 | 287 | # port 288 | complete -c docker -f -n '__fish_docker_no_subcommand' -a port -d 'List port mappings or a specific mapping for the CONTAINER' 289 | complete -c docker -A -n '__fish_seen_subcommand_from port' -l help -f -d 'Print usage' 290 | complete -c docker -A -f -n '__fish_seen_subcommand_from port' -a '(__fish_print_docker_containers running)' -d "Container" 291 | 292 | # ps 293 | complete -c docker -f -n '__fish_docker_no_subcommand' -a ps -d 'List containers' 294 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -s a -l all -f -d 'Show all containers (default shows just running)' 295 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -s f -l filter=[] -f -d 'Filter output based on conditions provided' 296 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -l format -f -d 'Pretty-print containers using a Go template' 297 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -l help -f -d 'Print usage' 298 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -s l -l latest -f -d 'Show the latest created container (includes all states)' 299 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -s n=-1 -f -d 'Show n last created containers (includes all states)' 300 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -l no-trunc -f -d "Don't truncate output" 301 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -s q -l quiet -f -d 'Only display numeric IDs' 302 | complete -c docker -A -n '__fish_seen_subcommand_from ps' -s s -l size -f -d 'Display total file sizes' 303 | 304 | # pull 305 | complete -c docker -f -n '__fish_docker_no_subcommand' -a pull -d 'Pull an image or a repository from a registry' 306 | complete -c docker -A -n '__fish_seen_subcommand_from pull' -s a -l all-tags -f -d 'Download all tagged images in the repository' 307 | complete -c docker -A -n '__fish_seen_subcommand_from pull' -l disable-content-trust=true -f -d 'Skip image verification' 308 | complete -c docker -A -n '__fish_seen_subcommand_from pull' -l help -f -d 'Print usage' 309 | complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_images)' -d "Image" 310 | complete -c docker -A -f -n '__fish_seen_subcommand_from pull' -a '(__fish_print_docker_repositories)' -d "Repository" 311 | 312 | # push 313 | complete -c docker -f -n '__fish_docker_no_subcommand' -a push -d 'Push an image or a repository to a registry' 314 | complete -c docker -A -n '__fish_seen_subcommand_from push' -l disable-content-trust=true -f -d 'Skip image signing' 315 | complete -c docker -A -n '__fish_seen_subcommand_from push' -l help -f -d 'Print usage' 316 | complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_images)' -d "Image" 317 | complete -c docker -A -f -n '__fish_seen_subcommand_from push' -a '(__fish_print_docker_repositories)' -d "Repository" 318 | 319 | # rename 320 | complete -c docker -f -n '__fish_docker_no_subcommand' -a rename -d 'Rename a container' 321 | complete -c docker -A -n '__fish_seen_subcommand_from rename' -l help -f -d 'Print usage' 322 | 323 | # restart 324 | complete -c docker -f -n '__fish_docker_no_subcommand' -a restart -d 'Restart a container' 325 | complete -c docker -A -n '__fish_seen_subcommand_from restart' -l help -f -d 'Print usage' 326 | complete -c docker -A -n '__fish_seen_subcommand_from restart' -s t -l time=10 -f -d 'Seconds to wait for stop before killing the container' 327 | complete -c docker -A -f -n '__fish_seen_subcommand_from restart' -a '(__fish_print_docker_containers all)' -d "Container" 328 | 329 | # rm 330 | complete -c docker -f -n '__fish_docker_no_subcommand' -a rm -d 'Remove one or more containers' 331 | complete -c docker -A -n '__fish_seen_subcommand_from rm' -s f -l force -f -d 'Force the removal of a running container (uses SIGKILL)' 332 | complete -c docker -A -n '__fish_seen_subcommand_from rm' -l help -f -d 'Print usage' 333 | complete -c docker -A -n '__fish_seen_subcommand_from rm' -s l -l link -f -d 'Remove the specified link' 334 | complete -c docker -A -n '__fish_seen_subcommand_from rm' -s v -l volumes -f -d 'Remove the volumes associated with the container' 335 | complete -c docker -A -f -n '__fish_seen_subcommand_from rm' -a '(__fish_print_docker_containers stopped)' -d "Container" 336 | 337 | # rmi 338 | complete -c docker -f -n '__fish_docker_no_subcommand' -a rmi -d 'Remove one or more images' 339 | complete -c docker -A -n '__fish_seen_subcommand_from rmi' -s f -l force -f -d 'Force removal of the image' 340 | complete -c docker -A -n '__fish_seen_subcommand_from rmi' -l help -f -d 'Print usage' 341 | complete -c docker -A -n '__fish_seen_subcommand_from rmi' -l no-prune -f -d 'Do not delete untagged parents' 342 | complete -c docker -A -f -n '__fish_seen_subcommand_from rmi' -a '(__fish_print_docker_images)' -d "Image" 343 | 344 | # run 345 | complete -c docker -f -n '__fish_docker_no_subcommand' -a run -d 'Run a command in a new container' 346 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s a -l attach=[] -f -d 'Attach to STDIN, STDOUT or STDERR' 347 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l add-host=[] -f -d 'Add a custom host-to-IP mapping (host:ip)' 348 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l blkio-weight -f -d 'Block IO (relative weight), between 10 and 1000' 349 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l blkio-weight-device=[] -f -d 'Block IO weight (relative device weight)' 350 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cpu-shares -f -d 'CPU shares (relative weight)' 351 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cap-add=[] -f -d 'Add Linux capabilities' 352 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cap-drop=[] -f -d 'Drop Linux capabilities' 353 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cgroup-parent -f -d 'Optional parent cgroup for the container' 354 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cidfile -f -d 'Write the container ID to the file' 355 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cpu-period -f -d 'Limit CPU CFS (Completely Fair Scheduler) period' 356 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cpu-quota -f -d 'Limit CPU CFS (Completely Fair Scheduler) quota' 357 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cpuset-cpus -f -d 'CPUs in which to allow execution (0-3, 0,1)' 358 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l cpuset-mems -f -d 'MEMs in which to allow execution (0-3, 0,1)' 359 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s d -l detach -f -d 'Run container in background and print container ID' 360 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l detach-keys -f -d 'Override the key sequence for detaching a container' 361 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l device=[] -f -d 'Add a host device to the container' 362 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l device-read-bps=[] -f -d 'Limit read rate (bytes per second) from a device' 363 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l device-read-iops=[] -f -d 'Limit read rate (IO per second) from a device' 364 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l device-write-bps=[] -f -d 'Limit write rate (bytes per second) to a device' 365 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l device-write-iops=[] -f -d 'Limit write rate (IO per second) to a device' 366 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l disable-content-trust=true -f -d 'Skip image verification' 367 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l dns=[] -f -d 'Set custom DNS servers' 368 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l dns-opt=[] -f -d 'Set DNS options' 369 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l dns-search=[] -f -d 'Set custom DNS search domains' 370 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s e -l env=[] -f -d 'Set environment variables' 371 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l entrypoint -f -d 'Overwrite the default ENTRYPOINT of the image' 372 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l env-file=[] -f -d 'Read in a file of environment variables' 373 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l expose=[] -f -d 'Expose a port or a range of ports' 374 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l group-add=[] -f -d 'Add additional groups to join' 375 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s h -l hostname -f -d 'Container host name' 376 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l help -f -d 'Print usage' 377 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s i -l interactive -f -d 'Keep STDIN open even if not attached' 378 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l ip -f -d 'Container IPv4 address (e.g. 172.30.100.104)' 379 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l ip6 -f -d 'Container IPv6 address (e.g. 2001:db8::33)' 380 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l ipc -f -d 'IPC namespace to use' 381 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l isolation -f -d 'Container isolation technology' 382 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l kernel-memory -f -d 'Kernel memory limit' 383 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s l -l label=[] -f -d 'Set meta data on a container' 384 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l label-file=[] -f -d 'Read in a line delimited file of labels' 385 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l link=[] -f -d 'Add link to another container' 386 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l log-driver -f -d 'Logging driver for container' 387 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l log-opt=[] -f -d 'Log driver options' 388 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s m -l memory -f -d 'Memory limit' 389 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l mac-address -f -d 'Container MAC address (e.g. 92:d0:c6:0a:29:33)' 390 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l memory-reservation -f -d 'Memory soft limit' 391 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l memory-swap -f -d "Swap limit equal to memory plus swap: '-1' to enable unlimited swap" 392 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l memory-swappiness=-1 -f -d 'Tune container memory swappiness (0 to 100)' 393 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l name -f -d 'Assign a name to the container' 394 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l net=default -f -d 'Connect a container to a network' 395 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l net-alias=[] -f -d 'Add network-scoped alias for the container' 396 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l oom-kill-disable -f -d 'Disable OOM Killer' 397 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l oom-score-adj -f -d "Tune host's OOM preferences (-1000 to 1000)" 398 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s P -l publish-all -f -d 'Publish all exposed ports to random ports' 399 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s p -l publish=[] -f -d "Publish a container's port(s) to the host" 400 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l pid -f -d 'PID namespace to use' 401 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l pids-limit -f -d 'Tune container pids limit (set -1 for unlimited)' 402 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l privileged -f -d 'Give extended privileges to this container' 403 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l read-only -f -d "Mount the container's root filesystem as read only" 404 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l restart=no -f -d 'Restart policy to apply when a container exits' 405 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l rm -f -d 'Automatically remove the container when it exits' 406 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l security-opt=[] -f -d 'Security Options' 407 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l shm-size -f -d 'Size of /dev/shm, default value is 64MB' 408 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l sig-proxy=true -f -d 'Proxy received signals to the process' 409 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l stop-signal=SIGTERM -f -d 'Signal to stop a container, SIGTERM by default' 410 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s t -l tty -f -d 'Allocate a pseudo-TTY' 411 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l tmpfs=[] -f -d 'Mount a tmpfs directory' 412 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s u -l user -f -d 'Username or UID (format: [:])' 413 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l ulimit=[] -f -d 'Ulimit options' 414 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l userns -f -d 'User namespace to use' 415 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l uts -f -d 'UTS namespace to use' 416 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s v -l volume=[] -f -d 'Bind mount a volume' 417 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l volume-driver -f -d 'Optional volume driver for the container' 418 | complete -c docker -A -n '__fish_seen_subcommand_from run' -l volumes-from=[] -f -d 'Mount volumes from the specified container(s)' 419 | complete -c docker -A -n '__fish_seen_subcommand_from run' -s w -l workdir -f -d 'Working directory inside the container' 420 | complete -c docker -A -f -n '__fish_seen_subcommand_from run' -a '(__fish_print_docker_images)' -d "Image" 421 | 422 | # save 423 | complete -c docker -f -n '__fish_docker_no_subcommand' -a save -d 'Save one or more images to a tar archive' 424 | complete -c docker -A -n '__fish_seen_subcommand_from save' -l help -f -d 'Print usage' 425 | complete -c docker -A -n '__fish_seen_subcommand_from save' -s o -l output -f -d 'Write to a file, instead of STDOUT' 426 | complete -c docker -A -f -n '__fish_seen_subcommand_from save' -a '(__fish_print_docker_images)' -d "Image" 427 | 428 | # search 429 | complete -c docker -f -n '__fish_docker_no_subcommand' -a search -d 'Search the Docker Hub for images' 430 | complete -c docker -A -n '__fish_seen_subcommand_from search' -l automated -f -d 'Only show automated builds' 431 | complete -c docker -A -n '__fish_seen_subcommand_from search' -l help -f -d 'Print usage' 432 | complete -c docker -A -n '__fish_seen_subcommand_from search' -l no-trunc -f -d "Don't truncate output" 433 | complete -c docker -A -n '__fish_seen_subcommand_from search' -s s -l stars -f -d 'Only displays with at least x stars' 434 | 435 | # start 436 | complete -c docker -f -n '__fish_docker_no_subcommand' -a start -d 'Start one or more stopped containers' 437 | complete -c docker -A -n '__fish_seen_subcommand_from start' -s a -l attach -f -d 'Attach STDOUT/STDERR and forward signals' 438 | complete -c docker -A -n '__fish_seen_subcommand_from start' -l detach-keys -f -d 'Override the key sequence for detaching a container' 439 | complete -c docker -A -n '__fish_seen_subcommand_from start' -l help -f -d 'Print usage' 440 | complete -c docker -A -n '__fish_seen_subcommand_from start' -s i -l interactive -f -d "Attach container's STDIN" 441 | complete -c docker -A -f -n '__fish_seen_subcommand_from start' -a '(__fish_print_docker_containers stopped)' -d "Container" 442 | 443 | # stats 444 | complete -c docker -f -n '__fish_docker_no_subcommand' -a stats -d 'Display a live stream of container(s) resource usage statistics' 445 | complete -c docker -A -n '__fish_seen_subcommand_from stats' -s a -l all -f -d 'Show all containers (default shows just running)' 446 | complete -c docker -A -n '__fish_seen_subcommand_from stats' -l help -f -d 'Print usage' 447 | complete -c docker -A -n '__fish_seen_subcommand_from stats' -l no-stream -f -d 'Disable streaming stats and only pull the first result' 448 | complete -c docker -A -f -n '__fish_seen_subcommand_from stats' -a '(__fish_print_docker_containers running)' -d "Container" 449 | 450 | # stop 451 | complete -c docker -f -n '__fish_docker_no_subcommand' -a stop -d 'Stop a running container' 452 | complete -c docker -A -n '__fish_seen_subcommand_from stop' -l help -f -d 'Print usage' 453 | complete -c docker -A -n '__fish_seen_subcommand_from stop' -s t -l time=10 -f -d 'Seconds to wait for stop before killing it' 454 | complete -c docker -A -f -n '__fish_seen_subcommand_from stop' -a '(__fish_print_docker_containers running)' -d "Container" 455 | 456 | # tag 457 | complete -c docker -f -n '__fish_docker_no_subcommand' -a tag -d 'Tag an image into a repository' 458 | complete -c docker -A -n '__fish_seen_subcommand_from tag' -l help -f -d 'Print usage' 459 | 460 | # top 461 | complete -c docker -f -n '__fish_docker_no_subcommand' -a top -d 'Display the running processes of a container' 462 | complete -c docker -A -n '__fish_seen_subcommand_from top' -l help -f -d 'Print usage' 463 | complete -c docker -A -f -n '__fish_seen_subcommand_from top' -a '(__fish_print_docker_containers running)' -d "Container" 464 | 465 | # unpause 466 | complete -c docker -f -n '__fish_docker_no_subcommand' -a unpause -d 'Unpause all processes within a container' 467 | complete -c docker -A -n '__fish_seen_subcommand_from unpause' -l help -f -d 'Print usage' 468 | complete -c docker -A -f -n '__fish_seen_subcommand_from unpause' -a '(__fish_print_docker_containers running)' -d "Container" 469 | 470 | # update 471 | complete -c docker -f -n '__fish_docker_no_subcommand' -a update -d 'Update configuration of one or more containers' 472 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l blkio-weight -f -d 'Block IO (relative weight), between 10 and 1000' 473 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l cpu-shares -f -d 'CPU shares (relative weight)' 474 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l cpu-period -f -d 'Limit CPU CFS (Completely Fair Scheduler) period' 475 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l cpu-quota -f -d 'Limit CPU CFS (Completely Fair Scheduler) quota' 476 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l cpuset-cpus -f -d 'CPUs in which to allow execution (0-3, 0,1)' 477 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l cpuset-mems -f -d 'MEMs in which to allow execution (0-3, 0,1)' 478 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l help -f -d 'Print usage' 479 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l kernel-memory -f -d 'Kernel memory limit' 480 | complete -c docker -A -n '__fish_seen_subcommand_from update' -s m -l memory -f -d 'Memory limit' 481 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l memory-reservation -f -d 'Memory soft limit' 482 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l memory-swap -f -d "Swap limit equal to memory plus swap: '-1' to enable unlimited swap" 483 | complete -c docker -A -n '__fish_seen_subcommand_from update' -l restart -f -d 'Restart policy to apply when a container exits' 484 | complete -c docker -A -f -n '__fish_seen_subcommand_from update' -a '(__fish_print_docker_containers running)' -d "Container" 485 | 486 | # version 487 | complete -c docker -f -n '__fish_docker_no_subcommand' -a version -d 'Show the Docker version information' 488 | complete -c docker -A -n '__fish_seen_subcommand_from version' -s f -l format -f -d 'Format the output using the given go template' 489 | complete -c docker -A -n '__fish_seen_subcommand_from version' -l help -f -d 'Print usage' 490 | 491 | # volume 492 | complete -c docker -f -n '__fish_docker_no_subcommand' -a volume -d 'Manage Docker volumes' 493 | complete -c docker -A -n '__fish_seen_subcommand_from volume' -l help -f -d 'Print usage' 494 | 495 | # wait 496 | complete -c docker -f -n '__fish_docker_no_subcommand' -a wait -d 'Block until a container stops, then print its exit code' 497 | complete -c docker -A -n '__fish_seen_subcommand_from wait' -l help -f -d 'Print usage' 498 | complete -c docker -A -f -n '__fish_seen_subcommand_from wait' -a '(__fish_print_docker_containers running)' -d "Container" 499 | 500 | 501 | --------------------------------------------------------------------------------