Skip to content

Commit

Permalink
Merge pull request #1576 from buildtesters/1571_remove_-t
Browse files Browse the repository at this point in the history
Remove short option "-t" for "--theme"
  • Loading branch information
shahzebsiddiqui authored Aug 2, 2023
2 parents 701af0a + aab3264 commit 931208b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ _buildtest ()
local opts="-h --help"
COMPREPLY=( $( compgen -W "${opts}" -- $cur ) );;
view|v)
local opts="--help --pager --theme -h -t"
local opts="--help --pager --theme -h"
COMPREPLY=( $( compgen -W "${opts}" -- $cur ) )

case "${prev}" in --theme|-t)
case "${prev}" in --theme)
COMPREPLY=( $( compgen -W "$(_avail_color_themes)" -- $cur ) )
return
esac
Expand Down Expand Up @@ -362,7 +362,7 @@ _buildtest ()
COMPREPLY=( $( compgen -W "$opts" -- $cur ) )
fi

case "${prev}" in --theme|-t)
case "${prev}" in --theme)
COMPREPLY=( $( compgen -W "$(_avail_color_themes)" -- $cur ) )
return
esac
Expand All @@ -373,7 +373,7 @@ _buildtest ()
if [[ $cur == -* ]] ; then
COMPREPLY=( $( compgen -W "$opts" -- $cur ) )
fi
case "${prev}" in --theme|-t)
case "${prev}" in --theme)
COMPREPLY=( $( compgen -W "$(_avail_color_themes)" -- $cur ) )
return
esac
Expand Down
1 change: 0 additions & 1 deletion buildtest/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ def get_parent_parser():
)
parent_parser["theme"] = argparse.ArgumentParser(add_help=False)
parent_parser["theme"].add_argument(
"-t",
"--theme",
metavar="Color Themes",
help="Specify a color theme, Pygments style to use when displaying output. See https://pygments.org/docs/styles/#getting-a-list-of-available-styles for available themese",
Expand Down
6 changes: 3 additions & 3 deletions docs/command_line_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ Let's run the following::
buildtest bc show sleep hello_world

Buildtest uses `rich <https://rich.readthedocs.io/>`_ python library for coloring which is used extensively throughout the buildtest output.
Rich supports several built-in themes that can be used for your preference. The ``buildtest bc show -t <THEME>`` can be used
Rich supports several built-in themes that can be used for your preference. The ``buildtest bc show --theme <THEME>`` can be used
select a color theme.

Currently, buildtest supports the following themes, feel free to tab complete::

 buildtest bc show -t
 buildtest bc show --theme
abap borland emacs gruvbox-dark lovelace native paraiso-light sas stata-dark vs
algol bw friendly gruvbox-light manni nord pastie solarized-dark stata-light xcode
algol_nu colorful friendly_grayscale igor material nord-darker perldoc solarized-light tango zenburn
Expand All @@ -232,7 +232,7 @@ Currently, buildtest supports the following themes, feel free to tab complete::

Let's try running the same example with ``emacs`` theme::

buildtest bc show -t emacs sleep
buildtest bc show --theme emacs sleep

If you want to see list of invalid buildspecs you can run::

Expand Down

0 comments on commit 931208b

Please sign in to comment.