mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Set help formatter width to terminal width (prevents wrapping)
This commit is contained in:
parent
4f9f96f646
commit
51c8e53ffe
1 changed files with 8 additions and 1 deletions
|
@ -2744,7 +2744,14 @@ def parseOpts():
|
|||
|
||||
return "".join(opts)
|
||||
|
||||
fmt = optparse.IndentedHelpFormatter()
|
||||
max_width = 80
|
||||
max_help_position = 80
|
||||
|
||||
# No need to wrap help messages if we're on a wide console
|
||||
columns = os.environ.get('COLUMNS', None)
|
||||
if columns: max_width = columns
|
||||
|
||||
fmt = optparse.IndentedHelpFormatter(width=max_width, max_help_position=max_help_position)
|
||||
fmt.format_option_strings = _format_option_string
|
||||
|
||||
kw = {
|
||||
|
|
Loading…
Reference in a new issue