You want a full “real install” (system-wide config + completions + man pages), so the best path is CMake install, not cargo install.
cargo install --path . builds usable binaries, but skips parts of a full distro-style install (manpage layout, extra vendor dirs integration, etc.) as noted in README.rst:195.
- CMake install wires in system paths and creates the standard fish directories from
cmake/Install.cmake:89, cmake/Install.cmake:93, cmake/Install.cmake:107, cmake/Install.cmake:126.
Recommended build plan for Linux:
# 1) deps (example names; adjust to your distro)
# rust >=1.85, cmake >=3.15, C compiler, PCRE2 dev, gettext(msgfmt), sphinx, ninja
# (README.rst:118-128)
# 2) configure
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DWITH_DOCS=ON \
-DWITH_MESSAGE_LOCALIZATION=ON \
-DFISH_USE_SYSTEM_PCRE2=ON
# 3) build
cmake --build build -j
# 4) install
sudo cmake --install build
What this gives you (important for your goal):
- System-wide config root:
/etc/fish with config.fish, conf.d, functions, completions (cmake/Install.cmake:89-91).
- Core shipped scripts/completions:
${prefix}/share/fish/{functions,completions,prompts,themes} (cmake/Install.cmake:126-140).
- Vendor drop-in dirs for third-party packages:
${prefix}/share/fish/vendor_{completions,functions,conf}.d (cmake/Install.cmake:107-109).
- Fish runtime search path already merges XDG + vendor dirs (
share/config.fish:45-52, share/config.fish:69-75).
For your foot -> tmux -> fish stack:
- fish is robust to terminals and “does not rely on system terminfo database” (
doc_src/terminal-compatibility.rst:18), but tmux config still matters for colors/keys.
- In
tmux.conf, use default-terminal "tmux-256color" and enable truecolor overrides for foot* if needed.
- Avoid auto-starting nested tmux blindly from fish config (fish FAQ mentions nesting pitfalls with
$TMUX, doc_src/faq.rst:317).
Quick verification after install:
fish --version
fish -c 'set --show fish_function_path fish_complete_path'
fish -c 'printf "%s\n" $__fish_vendor_completionsdirs $__fish_vendor_functionsdirs $__fish_vendor_confdirs'
If you want, I can tailor this into exact package install commands + exact cmake flags for your distro (Arch/Debian/Fedora/Nix) and whether you prefer /usr vs /usr/local for system-wide integration.