drove-cli 0.0.8__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: drove-cli
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Drove Command Line Interface
5
5
  License: Apache-2.0
6
6
  Keywords: container,docker,podman,distributed-systems,container-orchestrator
@@ -18,6 +18,7 @@ def build_parser() -> argparse.ArgumentParser:
18
18
  parser.add_argument("--username", "-u", help="Drove cluster username")
19
19
  parser.add_argument("--password", "-p", help="Drove cluster password")
20
20
  parser.add_argument("--debug", "-d", help="Print details of errors", default=False, action="store_true")
21
+ parser.add_argument("--print-completion", choices=["bash", "zsh", "tcsh"], help="Print shell completion script for the given shell")
21
22
  return parser
22
23
 
23
24
  def get_parser():
@@ -25,7 +26,7 @@ def get_parser():
25
26
  client = None
26
27
  client = drovecli.DroveCli(parser)
27
28
  return client.parser
28
-
29
+
29
30
 
30
31
  def run():
31
32
  parser = build_parser()
@@ -2,7 +2,7 @@ import argparse
2
2
  import droveclient
3
3
  from plugins import DrovePlugin
4
4
  from types import SimpleNamespace
5
-
5
+ import shtab
6
6
 
7
7
 
8
8
  class DroveCli:
@@ -24,6 +24,10 @@ class DroveCli:
24
24
  args = self.parser.parse_args()
25
25
  self.debug = args.debug
26
26
 
27
+ if args.print_completion:
28
+ print(shtab.complete(self.parser, shell=args.print_completion))
29
+ exit(0)
30
+
27
31
  # Load plugins
28
32
  if args.debug:
29
33
  print("Selected plugin: " + args.plugin)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "drove-cli"
3
- version = "0.0.8"
3
+ version = "0.0.9"
4
4
  description = "Drove Command Line Interface"
5
5
  authors = ["Santanu Sinha <santanu.sinha@gmail.com>"]
6
6
  maintainers = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes