🎨 git-status-all: use Path for topdirs
This commit is contained in:
parent
9e473bced8
commit
7334d6c99e
1 changed files with 3 additions and 2 deletions
|
@ -39,13 +39,14 @@ def working_directory(directory: Path):
|
||||||
|
|
||||||
|
|
||||||
@click.command
|
@click.command
|
||||||
@click.argument('topdirs', nargs=-1)
|
@click.argument('topdirs', nargs=-1, type=click.Path(exists=True, file_okay=False,
|
||||||
|
path_type=Path))
|
||||||
@click.option('-l', '--list', 'list_', is_flag=True, default=False,
|
@click.option('-l', '--list', 'list_', is_flag=True, default=False,
|
||||||
help='Just list the dirty directories')
|
help='Just list the dirty directories')
|
||||||
def search_dirty(topdirs, list_):
|
def search_dirty(topdirs, list_):
|
||||||
"""Search for dirty git working directories in TOPDIRS"""
|
"""Search for dirty git working directories in TOPDIRS"""
|
||||||
if len(topdirs) == 0:
|
if len(topdirs) == 0:
|
||||||
topdirs = ["."]
|
topdirs = [Path(".")]
|
||||||
|
|
||||||
for topdir in topdirs:
|
for topdir in topdirs:
|
||||||
for git_directory in git_directories(topdir):
|
for git_directory in git_directories(topdir):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue