From 217b45ae88ef65f8e7ab914b42b67a45a1b33530 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 8 May 2025 14:29:40 -0700 Subject: [PATCH] fix: Set parser.prog for shtab completion compatibility --- aider/args.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/args.py b/aider/args.py index 4e714a624..cd6e4363d 100644 --- a/aider/args.py +++ b/aider/args.py @@ -878,7 +878,8 @@ def main(): print(f"Supported shells are: {', '.join(shtab.SUPPORTED_SHELLS)}", file=sys.stderr) sys.exit(1) parser = get_parser([], None) - print(shtab.complete(parser, shell=shell, prog="aider")) + parser.prog = "aider" # Set the program name on the parser + print(shtab.complete(parser, shell=shell)) else: print("Error: Please specify a shell for completion.", file=sys.stderr) print(f"Usage: python {sys.argv[0]} completion ", file=sys.stderr)