docs: generate the Functions Reference from function comment headers #74
No Reviewers
Labels
Clear labels
Area/CI
Area/Completions
Area/Components
Area/Config
Area/Docs
Area/Functions
Area/Integrations
Area/Prompt & Theme
Area/Scripts
Area/Tests
Compat/Breaking
Kind/Bug
Kind/Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Refactor
Kind/Security
Kind/Testing
good first issue
help wanted
.github/workflows and repository automation
completions/ - tab-completion scripts
The opinionated-component system (C1-C6)
config.fish and conf.d/ - startup and environment
docs/manual/ and the generated manual, man page, and site
functions/ - user-facing functions and helpers
integrations/ - third-party tool wiring
themes/ and prompt appearance
scripts/ - standalone helper scripts
tests/ - the syntax lint and functional suite
Breaking change that won't be backward compatible
Something is not working
Tooling, dependencies, and housekeeping
Documentation changes
Improve existing functionality
New functionality
Makes existing behavior faster or lighter
Restructures code without changing behavior
This is security issue
Issue or pull request related to testing
Well-scoped and self-contained; a good place to start
Maintainer is looking for someone to pick this up
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
No labels
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#74
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Section 5 of the manual is no longer authored in Markdown. It is generated
from the man-page-style comment header already sitting above each function
in
functions/*.fish, so a command's documentation lives beside the codethat implements it and cannot drift from it.
What changed
Two sources of truth, split by content type
docs/manual/**— prose for every section except function entries.functions/*.fishcomment headers — Section 5.The 14 files under
docs/manual/05-functions/are now frontmatter-onlystubs supplying category order, title, and
helpKeywords. Every introparagraph measured zero words before removal — they were pure entry
containers.
New header labels
# CATEGORY— opt-in publishing. A function without one produces noentry. This keeps bundled plugin and prompt internals out of the manual
with no exclusion list to maintain. 96 functions carry it.
# DEPENDENCIES— comma-separated functions or binaries this one calls.The reverse
Used by:index is generated from it, giving the manual anavigable dependency graph that crosses category boundaries.
One-time content merge
Where the old Markdown had prose, examples, or notes the header lacked,
that content was merged into the header before the Markdown was deleted.
No documentation was lost.
Verification (
docs/verify-manual.py, now 24 checks)# CATEGORYfunction produces exactly one entrySYNOPSIS,DESCRIPTION,EXAMPLE# CATEGORYresolves to a stub, and no stub generates zero entries# DEPENDENCIESname is a real function or atype -qbinary##entries# CATEGORYThe round-trip test now excludes Section 5 on both sides, since that
section is generated rather than concatenated.
Fixes carried along
_first_sentence()nowunwraps the hard-wrapped leading paragraph and skips the
Synopsis:block whole — it restated the calling convention the card already shows
as its title.
open-url.fishNOTES claimed "Used internally by config-help --html."It is not;
config-helpcallsxdg-opendirectly. Line removed.git-clean.fishhad a duplicated-fentry in ARGUMENTS.dopsandfzf-updatewere undocumented; both now publish.Expected warning
verify-manual.pyprints:All eight are correct exclusions —
fastis a self-described placeholder,the rest are bundled plugin and prompt internals.
Note on generated files
docs/fish-config.mdis regenerated and committed.docs/fish-config.1is not — pandoc is not installed locally. CI regenerates and
auto-commits it on push; confirm in the job log.
Manual Verification
python3 docs/verify-manual.py→24/24 passedplus the 8-functionwarning above, nothing else.
help config functionsopens Section 5 and the entries readcorrectly in the pager.
help config gitjumps to the git category; spot-check thatgit-cleanshows-h/--helpand-f/--forceexactly once each.docs/fish-config.1was auto-committed.
man fish-configrenders Section 5 with all 96 entries./reference/git-and-version-control/— thecategory card grid lists its functions and each card's description
is a complete sentence, not a truncated clause and not a synopsis.
/reference/ai-and-developer-tools/agy/, confirm theDependencies: link to
agents-initresolves, and thatagents-init's own page shows Used by: linking back to bothagyandclaude(this is the cross-category case).# DESCRIPTION, re-runpython3 docs/build-manual.py --concat, and confirm the changeappears in
docs/fish-config.md— proving the header is the source.# CATEGORYto documented function headers 4c51ef7a33