Skip to content

Commit

Permalink
Increase output width of all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudyard Richter committed May 23, 2022
1 parent 9b59e7b commit 4af97a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/globus_cli/parsing/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import logging
import sys
from shutil import get_terminal_size
from typing import List

import click
Expand Down Expand Up @@ -51,6 +52,11 @@ def __init__(self, *args, **kwargs):
kwargs["help"] = helptext.format(
AUTOMATIC_ACTIVATION=self.AUTOMATIC_ACTIVATION_HELPTEXT
)
if "context_settings" not in kwargs:
kwargs["context_settings"] = {}
if "max_content_width" not in kwargs["context_settings"]:
term_size = get_terminal_size(fallback=(80, 20))
kwargs["context_settings"]["max_content_width"] = int(0.8 * term_size.columns)
super().__init__(*args, **kwargs)

def invoke(self, ctx):
Expand Down

0 comments on commit 4af97a7

Please sign in to comment.