Skip to content

Commit

Permalink
Added click auto-complete
Browse files Browse the repository at this point in the history
  • Loading branch information
retr0h committed Mar 14, 2020
1 parent dd82b08 commit ddf36a6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion gilt/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@
import os

import click
import click_completion
import fasteners

import gilt
from gilt import config
from gilt import git
from gilt import util

click_completion.init()


class NotFoundError(Exception):
"""Error raised when a config can not be found. """
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ setup_requires =
# These are required in actual runtime:
install_requires =
click
click-completion
colorama
fasteners
PyYAML
Expand Down

0 comments on commit ddf36a6

Please sign in to comment.