mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-30 17:41:14 -03:00
Commit0709e4be8b(Use standalone code paths by default, 2025-10-26) mainly wanted to embed internal functions to unbreak upgrade scenarios. Embedding man pages in CMake has small-ish disadvantages: 1. extra space usage 2. less discoverability 3. a "cyclic" dependency: 1. "sphinx-docs" depends on "fish_indent" 2. "fish_indent" via "crates/build-man-pages" depends on "doc_src/". So every "touch doc_src/foo.rst && ninja -Cbuild sphinx-docs" re-builds fish, just to re-run sphinx-build. The significant one is number 3. It can be worked around by running sphinx-build with stale "fish_indent" but I don't think we want to do that. Let's backtrack a little by stopping embedding man pages in CMake builds; use the on-disk man pages (which we still install). The remaining "regression" from0709e4be8bis that "ninja -Cbuild fish" needs to rebuild whenever anything in "share/" changes. I don't know if that's also annoying? Since man pages for "build/fish" are not in share/, expose the exact path as $__fish_man_dir.
21 lines
555 B
Fish
21 lines
555 B
Fish
# RUN: %fish %s
|
|
|
|
# REQUIRES: command -v sphinx-build
|
|
# REQUIRES: command -v man
|
|
# REQUIRES: test "$FISH_BUILD_DOCS" != "0"
|
|
|
|
# Override the test-override again.
|
|
__fish_data_with_file functions/__fish_print_help.fish source
|
|
|
|
set -l deroff col -b -p -x
|
|
|
|
set -lx MANWIDTH 80
|
|
man abbr | $deroff | head -n4
|
|
# CHECK: ABBR(1) {{ *}} fish-shell {{ *}} ABBR(1)
|
|
# CHECK: NAME
|
|
# CHECK: abbr - manage fish abbreviations
|
|
man : | $deroff | head -n4
|
|
# CHECK: TRUE(1) {{ *}} fish-shell {{ *}} TRUE(1)
|
|
# CHECK: NAME
|
|
# CHECK: true - return a successful result
|