Skip to content

Commit c347042

Browse files
committed
feat: file can now be specified with wildcards on Windows
1 parent bf403ee commit c347042

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

dendro_text/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.0
1+
1.7.0

dendro_text/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import numpy as np
99
from tqdm import tqdm
1010
from init_attrs_with_kwargs import cast_set_attrs
11+
from win_wildcard import get_windows_shell, SHELL_TO_EXPAND_WILDCARD_FUNC
1112

1213
try:
1314
from docopt import docopt
@@ -272,6 +273,13 @@ def main():
272273
)
273274

274275
files = args.file
276+
ws = get_windows_shell()
277+
if ws is not None:
278+
expand_func = SHELL_TO_EXPAND_WILDCARD_FUNC[ws]
279+
r = []
280+
for f in files:
281+
r.extend(expand_func(f))
282+
files = r
275283
if not (args.diff or args.no_uniq_files):
276284
files = uniq(files)
277285

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ install_requires =
3636
# matplotlib # for option -p
3737
tqdm
3838
init-attrs-with-kwargs>=0.2.0
39+
win-wildcard>=0.5.0
3940

4041
[options.extras_require]
4142
docopt-ng = docopt-ng

0 commit comments

Comments
 (0)