Skip to content

Commit

Permalink
Merge pull request #1559 from buildtesters/alias_for_buildtest_config…
Browse files Browse the repository at this point in the history
…_validate

alias for buildtest config validate command
  • Loading branch information
shahzebsiddiqui authored Jul 17, 2023
2 parents 5acc622 + 858142c commit bec8564
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ _buildtest ()
;;

config|cg)
local cmds="-h --help co compilers e edit ex executors p path systems validate v view"
local cmds="-h --help co compilers e edit ex executors p path systems val validate v view"

COMPREPLY=( $( compgen -W "${cmds}" -- $cur ) )
# handle completion logic for 'buildtest config <subcommand>' based on subcommands
Expand Down Expand Up @@ -312,7 +312,7 @@ _buildtest ()
;;

buildspec|bc)
local cmds="-h --help ef edit-file et edit-test f find maintainers s show sf show-fail sm summary val validate"
local cmds="-h --help ef edit-file et edit-test f find m maintainers s show sf show-fail sm summary val validate"
COMPREPLY=( $( compgen -W "${cmds}" -- $cur ) )

# switch based on 2nd word 'buildtest buildspec <subcommand>'
Expand Down
4 changes: 3 additions & 1 deletion buildtest/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,9 @@ def config_menu(subparsers, parent_parser):
subparsers_config.add_parser("systems", help="List all available systems")
# buildtest config validate
subparsers_config.add_parser(
"validate", help="Validate buildtest settings file with schema."
"validate",
aliases=["val"],
help="Validate buildtest settings file with schema.",
)
# buildtest config view
subparsers_config.add_parser(
Expand Down
2 changes: 1 addition & 1 deletion buildtest/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def config_cmd(args, configuration, editor, system):
args.invalid,
)

elif args.config == "validate":
elif args.config in ["validate", "val"]:
validate_config(configuration, system.system["moduletool"])

elif args.config == "systems":
Expand Down

0 comments on commit bec8564

Please sign in to comment.