From b6200d0399f3e146c5427244b74fa141d3435ea9 Mon Sep 17 00:00:00 2001 From: John Dewey Date: Sat, 14 Mar 2020 14:15:53 -0700 Subject: [PATCH] Added click auto-complete --- gilt/shell.py | 18 +++++++++++++++++- setup.cfg | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gilt/shell.py b/gilt/shell.py index 72d3bb5..6e9a68a 100644 --- a/gilt/shell.py +++ b/gilt/shell.py @@ -21,6 +21,7 @@ import os import click +import click_completion import fasteners import gilt @@ -49,7 +50,22 @@ class NotFoundError(Exception): @click.version_option(version=gilt.__version__) @click.pass_context def main(ctx, config, debug): # pragma: no cover - """gilt - A GIT layering tool. """ + """ + \b + o o + o | | + o--o | -o- + | | | | | + o--O | o o + | + o--o + + gilt - A GIT layering tool. + + Enable autocomplete issue: + + eval "$(_GILT_COMPLETE=source gilt)" + """ ctx.obj = {} ctx.obj["args"] = {} ctx.obj["args"]["debug"] = debug diff --git a/setup.cfg b/setup.cfg index 23e2aa9..7a7a574 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,6 +42,7 @@ setup_requires = # These are required in actual runtime: install_requires = click + click-completion colorama fasteners PyYAML