fix(config_help): reliable section lookup and jump via index + tail-slice
- Add docs/fish-config.index mapping 100+ keyword aliases to exact heading text; config_help looks up here first, falls back to normalized heading scan (strips non-alphanumeric, lowercases both sides) for unknown terms. - Resolve line numbers at runtime with grep -F so the index never goes stale from doc edits — only heading renames require an update. - Fix section jump: --section-header pins delimiter lines as sticky headers removing them from ov pattern-search scope. Replace --pattern with tail -n +$start_line piped before ov; the target section is the first line so no search is needed and forward section nav still works. - Fix empty sections sidebar: ov matches --section-delimiter against logical (ANSI-stripped) text, so "^#" is correct for bat-colored output; the previous ANSI escape-sequence regex never matched anything.
This commit is contained in:
+10
-1
@@ -1216,7 +1216,16 @@ calls fisher update as its first step.
|
||||
config_help
|
||||
|
||||
ov renders the Markdown with syntax highlighting and section-based
|
||||
navigation. Use , and . to jump between sections. Press / to search.
|
||||
navigation.
|
||||
|
||||
Space next section
|
||||
^ previous section
|
||||
Alt+u toggle section list sidebar
|
||||
/ search forward
|
||||
n / N next / previous search match
|
||||
g go to line number
|
||||
j interactive jump target (line, %, or 'section')
|
||||
q quit
|
||||
|
||||
## With bat
|
||||
|
||||
|
||||
Reference in New Issue
Block a user