Skip to content

Commit 6b72110

Browse files
committed
Add global sphinx options
1 parent 0aecaa8 commit 6b72110

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

sphinx/_cli/__init__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,33 @@ def _create_parser() -> _RootArgumentParser:
186186
default=argparse.SUPPRESS,
187187
help=__('Show this message and exit.'),
188188
)
189+
parser.add_argument(
190+
'-v', '--verbose',
191+
action='count',
192+
dest='verbosity',
193+
default=0,
194+
help=__('Increase verbosity (can be repeated)'),
195+
)
196+
parser.add_argument(
197+
'-q', '--quiet',
198+
action='store_const',
199+
dest='verbosity',
200+
const=-1,
201+
help=__('Only print errors and warnings.'),
202+
)
203+
parser.add_argument(
204+
'--silent',
205+
action='store_const',
206+
dest='verbosity',
207+
const=-2,
208+
help=__('No output at all'),
209+
)
210+
parser.add_argument(
211+
'--colour', '--color',
212+
choices=('auto', 'yes', 'no'),
213+
default='auto',
214+
help=__('Emit coloured output to the terminal, if supported'),
215+
)
189216

190217
parser.add_argument(
191218
'COMMAND',

0 commit comments

Comments
 (0)