mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
fix: Set parser.prog for shtab completion compatibility
This commit is contained in:
parent
30097ab859
commit
217b45ae88
1 changed files with 2 additions and 1 deletions
|
@ -878,7 +878,8 @@ def main():
|
||||||
print(f"Supported shells are: {', '.join(shtab.SUPPORTED_SHELLS)}", file=sys.stderr)
|
print(f"Supported shells are: {', '.join(shtab.SUPPORTED_SHELLS)}", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
parser = get_parser([], None)
|
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:
|
else:
|
||||||
print("Error: Please specify a shell for completion.", file=sys.stderr)
|
print("Error: Please specify a shell for completion.", file=sys.stderr)
|
||||||
print(f"Usage: python {sys.argv[0]} completion <shell_name>", file=sys.stderr)
|
print(f"Usage: python {sys.argv[0]} completion <shell_name>", file=sys.stderr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue