From cdf850f2e74cdcff4e9840a6331186b310caf079 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 8 Jun 2026 23:18:31 -0400 Subject: [PATCH] fix(config-help): quote +/pattern in MANPAGER to prevent word-splitting on spaces --- functions/config-help.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/config-help.fish b/functions/config-help.fish index 9a3f4ba..428868a 100644 --- a/functions/config-help.fish +++ b/functions/config-help.fish @@ -224,7 +224,9 @@ function config-help --description 'Open the offline fish shell configuration ma # then pass it as a less search pattern. MANPAGER is overridden # here because the bat renderer does not support +/pattern jumps. set -l pattern (string replace -ra '^#+ *' '' -- $found_text | string trim) - env MANPAGER="less +/$pattern" man -l "$man_file" + # Single-quote the +/pattern inside the MANPAGER string so the + # shell doesn't word-split headings that contain spaces. + env MANPAGER="less '+/$pattern'" man -l "$man_file" else if test -n "$section_kw" set_color yellow echo "note: no section matching '$section_kw' — opening at top" >&2