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

create parent parser for --pager option used in subcommands #1406

Merged
merged 3 commits into from
Mar 1, 2023

Conversation

shahzebsiddiqui
Copy link
Member

@shahzebsiddiqui shahzebsiddiqui commented Mar 1, 2023

(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest cg view -h | grep pager
usage: buildtest [options] [COMMANDS] config view [-h] [--pager]
  --pager               Enable PAGING when viewing result

(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest rt -h | grep pager
usage: buildtest [options] [COMMANDS] report [-h] [--pager] [--filter FILTER]
  --pager               Enable PAGING when viewing result

(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest bc find -h | grep pager
usage: buildtest [options] [COMMANDS] buildspec find [-h] [--pager] [-b] [-e]
  --pager              Enable PAGING when viewing result

(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest bc sm -h | grep pager
usage: buildtest [options] [COMMANDS] buildspec summary [-h] [--pager]
  --pager     Enable PAGING when viewing result

(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest rt -h | grep pager
usage: buildtest [options] [COMMANDS] report [-h] [--pager] [--filter FILTER]
  --pager               Enable PAGING when viewing result
(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest rt sm -h | grep pager
usage: buildtest [options] [COMMANDS] report summary [-h] [--pager]
  --pager         Enable PAGING when viewing result
(buildtest)  ~/Documents/github/buildtest/ [parent_parser_declaration_for_pager_option*] buildtest it l -h | grep pager 
usage: buildtest [options] [COMMANDS] inspect list [-h] [--pager] [-n] [-t]
  --pager          Enable PAGING when viewing result

there are still several more ...

we remove global option '--pager' now its back in the subcommands.
update the bash completion script
we also removed logic for '--color' selection in bash completion in subcommands which is not being used since this is taken care of at the global level
@shahzebsiddiqui shahzebsiddiqui merged commit 3518337 into devel Mar 1, 2023
@shahzebsiddiqui shahzebsiddiqui deleted the parent_parser_declaration_for_pager_option branch March 1, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant