This commit is contained in:
Paul Gauthier 2023-05-10 18:01:09 -07:00
parent f8939c55a5
commit b74779d1b7
2 changed files with 5 additions and 2 deletions

View file

@ -166,7 +166,7 @@ class Commands:
matched_files = [
file
for file in self.coder.abs_fnames
if word in os.path.relpath(file, self.coder.root)
if word.lower() in os.path.relpath(file, self.coder.root).lower()
]
if not matched_files:
self.console.print(f"[red]No files matched '{word}'")

View file

@ -70,8 +70,11 @@ def get_input(history_file, fnames, commands):
if not common_prefix.endswith(os.path.sep):
common_prefix += os.path.sep
short_fnames = [fname.replace(common_prefix, "", 1) for fname in fnames]
else:
elif len(fnames):
short_fnames = [os.path.basename(fnames[0])]
else:
short_fnames = []
show = " ".join(short_fnames)
if len(show) > 10:
show += "\n"