Permalink
Browse files

Add note about generation.

  • Loading branch information...
1 parent 1b64390 commit 4e5b9e42b1792fcdba43ef94a4446de445e26430 Barnaby Gray committed Mar 1, 2014
Showing with 6 additions and 4 deletions.
  1. +2 −0 docker.fish
  2. +4 −4 gen_docker_fish_completions.py
View
@@ -1,4 +1,6 @@
# docker.fish - docker completions for fish shell
+# This file is generated by gen_docker_fish_completions.py from:
+# https://github.com/barnybug/docker-fish-completion
function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand'
for i in (commandline -opc)
@@ -75,9 +75,8 @@ def subcommand(self, command, description):
return Subcommand(command, description, args, switches)
class FishGenerator(object):
- def __init__(self, docker, fout):
+ def __init__(self, docker):
self.docker = docker
- self.fout = fout
# Generate fish completions definitions for docker
def generate(self):
@@ -87,6 +86,8 @@ def generate(self):
def header(self):
print """# docker.fish - docker completions for fish shell
+# This file is generated by gen_docker_fish_completions.py from:
+# https://github.com/barnybug/docker-fish-completion
function __fish_docker_no_subcommand --description 'Test if docker has yet to be given the subcommand'
for i in (commandline -opc)
@@ -161,8 +162,7 @@ def subcommands(self):
if __name__ == '__main__':
- with file('docker.fish', 'w') as fout:
- FishGenerator(DockerCmdLine(), fout).generate()
+ FishGenerator(DockerCmdLine()).generate()
# complete -f -n '__fish_docker_no_subcommand' -c docker -a 'attach' --description "Attach to a running container"
# complete -f -n '__fish_seen_subcommand_from attach' -c docker -l no-stdin --description "Do not attach stdin"

0 comments on commit 4e5b9e4

Please sign in to comment.