Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add completion generation #25

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
prettytable
humanize
confuse
pyyaml
urllib3
# proxmoxer depdends
proxmoxer>=2.0.1
requests
requests_toolbelt
openssh_wrapper
paramiko
prettytable
humanize
confuse
pyyaml
urllib3
shtab

# proxmoxer depdends
proxmoxer>=2.0.1
requests
requests_toolbelt
openssh_wrapper
paramiko
4 changes: 4 additions & 0 deletions src/pvecontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import re
import urllib3
import shtab

from pvecontrol import actions, node, vm, task, storage
from pvecontrol.cluster import PVECluster
Expand Down Expand Up @@ -146,6 +147,9 @@ def _parser():
parser_test = subparsers.add_parser("_test")
parser_test.set_defaults(func=action_test)

# shell autocomplete generation
shtab.add_argument_to(parser, ["-s", "--print-completion"])

return parser.parse_args()


Expand Down
Loading