diff --git a/aider/commands.py b/aider/commands.py index 3a7e2e407..3edf3c157 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -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}'") diff --git a/aider/getinput.py b/aider/getinput.py index 8e2e140de..ca453e6fa 100644 --- a/aider/getinput.py +++ b/aider/getinput.py @@ -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"