16 lines
444 B
Python
16 lines
444 B
Python
import click
|
|
from complex.cli import pass_environment
|
|
|
|
|
|
@click.command('init', short_help='Initializes a repo.')
|
|
@click.argument('path', required=False, type=click.Path(resolve_path=True))
|
|
@pass_environment
|
|
def cli(ctx, path):
|
|
"""Initializes a repository."""
|
|
print(f'{ctx=}')
|
|
print(f'{dir(ctx)=}')
|
|
if path is None:
|
|
path = ctx.home
|
|
ctx.log('Initialized the repository in %s',
|
|
click.format_filename(path))
|