Improve inputrename fetching of input files.
This commit is contained in:
parent
f3a35dd83b
commit
33f4c3117c
1 changed files with 6 additions and 2 deletions
|
@ -11,10 +11,14 @@ from voussoirkit import spinal
|
||||||
|
|
||||||
@pipeable.ctrlc_return1
|
@pipeable.ctrlc_return1
|
||||||
def inputrename_argparse(args):
|
def inputrename_argparse(args):
|
||||||
|
cwd = pathclass.cwd()
|
||||||
if args.recurse:
|
if args.recurse:
|
||||||
files = (file for file in spinal.walk('.') if args.keyword in file.basename)
|
files = cwd.walk_files()
|
||||||
else:
|
else:
|
||||||
files = (file for file in pathclass.cwd().listdir() if args.keyword in file.basename)
|
files = cwd.listdir_files()
|
||||||
|
files = (file for file in files if args.keyword in file.basename)
|
||||||
|
files = sorted(files)
|
||||||
|
|
||||||
prev = None
|
prev = None
|
||||||
for file in files:
|
for file in files:
|
||||||
pipeable.stderr(file.relative_path)
|
pipeable.stderr(file.relative_path)
|
||||||
|
|
Loading…
Reference in a new issue