diff --git a/gilt/shell.py b/gilt/shell.py index 72d3bb5..1e4115c 100644 --- a/gilt/shell.py +++ b/gilt/shell.py @@ -21,6 +21,7 @@ import os import click +import click_completion import fasteners import gilt @@ -28,6 +29,8 @@ from gilt import git from gilt import util +click_completion.init() + class NotFoundError(Exception): """Error raised when a config can not be found. """ @@ -49,7 +52,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)" + """ # noqa: H404,H405 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