fix: Ensure command starts with slash before retrieving raw completions

This commit is contained in:
Paul Gauthier 2024-09-27 16:10:14 -07:00 committed by Paul Gauthier (aider)
parent 0a77b6cfac
commit 8e02cadfbc

View file

@ -165,7 +165,10 @@ class Commands:
return inp[0] in "/!"
def get_raw_completions(self, cmd):
assert cmd.startswith("/")
cmd = cmd[1:]
cmd = cmd.replace("-", "_")
raw_completer = getattr(self, f"completions_raw_{cmd}", None)
return raw_completer