Commit Graph

7 Commits

Author SHA1 Message Date
rootiest 12d83112ea fix(config_help): use string split -m 1 to extract line number and text
string split -f does not accept ranges like '2-'; split on the first
colon only with -m 1 to correctly separate the grep line number from
the heading text without erroring on every heading line.
2026-06-06 03:40:43 -04:00
rootiest 63fc4bb6be fix(config_help): normalize keyword and heading before matching
The previous grep pattern required an exact substring match, so
"keybindings" failed to match the heading "KEY BINDINGS". Normalize
both the user keyword and each heading line by stripping all
non-alphanumeric characters and lowercasing before comparing, so
"keybindings" → "keybindings" matches "KEY BINDINGS" → "keybindings",
"fish-deps" matches "fish-deps", etc.
2026-06-06 03:39:53 -04:00
rootiest 41e801eab1 fix(config_help): jump to section heading via psub + --jump-target
--pattern matched the first textual occurrence of the keyword anywhere
in the document. Replace with psub to make bat's output seekable, then
use --jump-target with the line number resolved by grep against heading
lines only (^#+.*keyword), so keyword jumps land on the actual section
header rather than an example or body reference.
2026-06-06 03:35:34 -04:00
rootiest 490834e6f9 fix(config_help): use --pattern for section jump; correct ov nav keys
--jump-target does not work reliably on piped stdin. Replace with
--pattern which positions ov at the first occurrence of the keyword
(works like less +/pattern) and keeps the match highlighted so the
user can press n/N to navigate further occurrences.

Also correct the section navigation keys in the offline manual:
  Space = next section  (not '.')
  ^     = previous section  (not ',')
  Alt+u = section list sidebar
2026-06-06 03:29:14 -04:00
rootiest 1a752c4c87 fix(config_help): use ANSI-aware section delimiter for bat+ov pipeline
bat emits Markdown headers as ESC[<color>m# so the raw ^# regex never
matches. Use ^(\x1b\[[0-9;]*m)+# instead — matches one or more ANSI
escape sequences before the # regardless of theme or color depth.
Restores section navigation (,/.) while keeping bat syntax highlighting.
2026-06-06 03:24:11 -04:00
rootiest 76d651b0de fix(config_help): replace invalid --syntax flag with bat|ov pipeline
ov does not support --syntax/--syntax-name. Use bat --color=always piped
into ov --jump-target for syntax highlighting + line positioning. Fall
back to ov alone (section nav via --section-delimiter) when bat is absent.
2026-06-06 03:18:47 -04:00
rootiest 02c27c6907 feat(docs): add offline documentation, config_help viewer, and CI pipelines
- docs/fish-config.md: curated terminal-optimized manual covering all
  public functions, keybindings, abbreviations, configuration variables,
  dependency catalog, and customization guide. Written for ov/bat/less
  readability rather than browser rendering — no callouts, no hyperlinks.
  Pandoc-compatible YAML front matter for man page compilation.

- functions/config_help.fish: viewer function with fallback chain
  ov -> bat -> man -l -> less -> cat. Accepts an optional section
  keyword to jump directly to the first matching heading.

- .gitea/workflows/man-page.yml: compiles docs/fish-config.md to
  docs/fish-config.1 via pandoc on every push to main that touches the
  source doc, then commits the result automatically.

- .gitea/workflows/docs-drift.yml: opens a reminder issue whenever
  README.md changes without a corresponding docs/fish-config.md update
  in the same push.

- README.md: documents config_help and the offline manual.
- AGENTS.md: adds Convention 10 requiring offline doc to be updated
  alongside any function, keybinding, or config change.
2026-06-06 03:14:36 -04:00