Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added click auto-complete #86

Merged
merged 1 commit into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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