Download hermes_cli/subcommands/completion.py from SaylorTwift/hermes-agent: direct link, hf CLI and curl.
- Browser
- Download file 633 Bytes
-
https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/hermes_cli/subcommands/completion.py
- Command line
-
hf download hf://SaylorTwift/hermes-agent/hermes_cli/subcommands/completion.py
-
curl -L -o completion.py https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/hermes_cli/subcommands/completion.py
633 Bytes
| """``hermes completion`` subcommand parser.""" | |
| from __future__ import annotations | |
| from typing import Callable | |
| def build_completion_parser(subparsers, *, cmd_completion: Callable, parser) -> None: | |
| """Attach the ``completion`` subcommand to ``subparsers``.""" | |
| completion_parser = subparsers.add_parser( | |
| "completion", help="Print shell completion script (bash, zsh, or fish)") | |
| completion_parser.add_argument( | |
| "shell", nargs="?", default="bash", choices=["bash", "zsh", "fish"], | |
| help="Shell type (default: bash)") | |
| completion_parser.set_defaults(func=lambda args: cmd_completion(args, parser)) | |