feat(config-help): add section linking for HTML and man page
- Section keyword is now extracted early and shared across all three output modes (pager, HTML, man) rather than duplicated per branch - --html with a section keyword resolves the heading to a pandoc anchor ID and looks it up in docs/html/sitemap.json; handles both sub-section fragment paths and top-level sections that are their own page - --man with a section keyword overrides MANPAGER to `less +/pattern` so the page opens at the nearest heading match - --help output updated to show [section] in USAGE and section+flag examples (help config keybindings --html, help config pkg --man) - docs/fish-config.md §5.14 synopsis, flags, and examples updated - docs/fish-config.md §11 "Viewing" sections updated for both HTML and man page to document the section+flag invocation - README table updated with section+html and section+man rows
This commit is contained in:
@@ -46,7 +46,9 @@ To browse the docs from the terminal:
|
||||
| `help config` | Open the terminal manual in the best available pager |
|
||||
| `help config <keyword>` | Jump directly to a section matching the keyword |
|
||||
| `help config --html` | Open the pre-built HTML docs in the default browser |
|
||||
| `help config <keyword> --html` | Open HTML docs at the matching section anchor |
|
||||
| `help config --man` | Open the compiled man page via `man -l` |
|
||||
| `help config <keyword> --man` | Open the man page jumping to the nearest match |
|
||||
|
||||
The pager falls back through: **ov** → **bat** → **man -l** → **less** → **cat**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user