From 50732a7b58c8e45dc11513292aaeab5c20efebe7 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 23 Jul 2024 09:50:03 +0200 Subject: [PATCH] Do case insensitive completions in /add --- aider/io.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aider/io.py b/aider/io.py index fc7e56f99..f00f925f3 100644 --- a/aider/io.py +++ b/aider/io.py @@ -68,14 +68,14 @@ class AutoCompleter(Completer): if text[0] == "/": if len(words) == 1 and not text[-1].isspace(): - partial = words[0] + partial = words[0].lower() candidates = self.command_names for cmd in candidates: if cmd.startswith(partial): yield Completion(cmd, start_position=-len(partial)) elif len(words) > 1 and not text[-1].isspace(): cmd = words[0] - partial = words[-1] + partial = words[-1].lower() if cmd not in self.command_names: return @@ -86,7 +86,7 @@ class AutoCompleter(Completer): candidates = self.command_completions[cmd] for word in candidates: - if partial in word: + if partial in word.lower(): yield Completion(word, start_position=-len(partial)) return