From 87ba1adf064d5e8be9c05df918e950e0dc8a4d1c Mon Sep 17 00:00:00 2001 From: Peter Rice Date: Fri, 25 Jul 2025 21:38:48 -0400 Subject: [PATCH] improve help text formatting --- CHANGELOG.md | 4 ++++ src/qbpm/main.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43128c0..194f80f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# next + - `contrib/qbpm.desktop`: add `MimeType` and `Keywords`, fix incorrect formatting of `Categories` + - allow help text to be slightly wider to avoid awkward line breaks + # 1.0rc4 - `choose`: support `walker`, `tofi`, and `wmenu` - better detection of invalid/nonexistent profiles diff --git a/src/qbpm/main.py b/src/qbpm/main.py index 6d090ba..bc26585 100644 --- a/src/qbpm/main.py +++ b/src/qbpm/main.py @@ -15,7 +15,7 @@ from .log import error, or_phrase from .menus import supported_menus from .paths import default_profile_dir, qutebrowser_data_dir -CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]} +CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"], "max_content_width": 91} @dataclass @@ -61,7 +61,7 @@ def creator_options(orig: Callable[..., T]) -> Callable[..., T]: "--qutebrowser-config-dir", "qb_config_dir", type=click.Path(file_okay=False, readable=True, path_type=Path), - help="Location of the qutebrowser config to inherit from.", + help="Location of the qutebrowser config to source.", ), click.option("-l", "--launch", is_flag=True, help="Launch the profile."), click.option( @@ -102,7 +102,7 @@ class LowerCaseFormatter(logging.Formatter): "--profile-dir", type=click.Path(file_okay=False, writable=True, path_type=Path), envvar="QBPM_PROFILE_DIR", - show_envvar=True, + show_envvar=False, default=None, help="Location to store qutebrowser profiles.", ) -- 2.51.2