Merge pull request 'pkgs/cli: Fix dynamic completions for update-hardware-config and it's flags' (#2330) from kenji/clan-core:kenji-update-hardware-config-fix-completions into main
This commit is contained in:
@@ -220,22 +220,22 @@ def register_update_hardware_config(parser: argparse.ArgumentParser) -> None:
|
|||||||
help="the name of the machine",
|
help="the name of the machine",
|
||||||
type=machine_name_type,
|
type=machine_name_type,
|
||||||
)
|
)
|
||||||
machine_parser = parser.add_argument(
|
add_dynamic_completer(machine_parser, complete_machines)
|
||||||
|
parser.add_argument(
|
||||||
"target_host",
|
"target_host",
|
||||||
type=str,
|
type=str,
|
||||||
nargs="?",
|
nargs="?",
|
||||||
help="ssh address to install to in the form of user@host:2222",
|
help="ssh address to install to in the form of user@host:2222",
|
||||||
)
|
)
|
||||||
machine_parser = parser.add_argument(
|
parser.add_argument(
|
||||||
"--password",
|
"--password",
|
||||||
help="Pre-provided password the cli will prompt otherwise if needed.",
|
help="Pre-provided password the cli will prompt otherwise if needed.",
|
||||||
type=str,
|
type=str,
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
machine_parser = parser.add_argument(
|
parser.add_argument(
|
||||||
"--backend",
|
"--backend",
|
||||||
help="The type of hardware report to generate.",
|
help="The type of hardware report to generate.",
|
||||||
choices=["nixos-generate-config", "nixos-facter"],
|
choices=["nixos-generate-config", "nixos-facter"],
|
||||||
default="nixos-generate-config",
|
default="nixos-generate-config",
|
||||||
)
|
)
|
||||||
add_dynamic_completer(machine_parser, complete_machines)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user