Fish shell build for Linux with completions

/nvme/code/rust/fish-shell · 8 messages · 37 parts · · 73,104 tokens
Created Feb 10, 02:51:54 PM · Updated Feb 10, 02:57:51 PM · 33 syncs
userFeb 10, 02:51:54 PM

This is the official Fish shell repo, I'm trying to build this for my linux system, and it will be running in a virtual temrinal like foot, and within tmux within that.

Look at the best way to build the project with all the extra things like completions and system wide configuration

assistantFeb 10, 02:51:54 PM
gpt-5.3-codex · openai
**Planning build inspection**
globcompleted
Output
/nvme/code/rust/fish-shell/cmake/Docs.cmake
/nvme/code/rust/fish-shell/CMakeLists.txt
/nvme/code/rust/fish-shell/cmake/Install.cmake
/nvme/code/rust/fish-shell/cmake/Tests.cmake
/nvme/code/rust/fish-shell/cmake/Rust.cmake
/nvme/code/rust/fish-shell/cmake/MacApp.cmake
/nvme/code/rust/fish-shell/vagrants/bsds/README.md
/nvme/code/rust/fish-shell/crates/printf/README.md
/nvme/code/rust/fish-shell/cmake/PCRE2.cmake
/nvme/code/rust/fish-shell/cmake/FindRust.cmake
/nvme/code/rust/fish-shell/cmake/Benchmark.cmake
grepcompleted
(?i)(build|cmake|install|completions|vendor|systemd|xdg|config|share/fish|fish_complete_path|fish_function_path|prefix|DESTDIR|CMAKE_INSTALL_PREFIX)
Output
Found 44 matches
/nvme/code/rust/fish-shell/vagrants/bsds/README.md:
  Line 3: This directory contains Vagrant configurations for testing across multiple BSD operating systems.
  Line 5: Use the `build_fish_on_bsd.sh` script to automatically build fish-shell on multiple BSD VMs:
  Line 8: ./build_fish_on_bsd.sh freebsd_14_0 openbsd_7_4 netbsd_9_3 dragonflybsd_6_4
  Line 15: - Run `cargo build` in `/sync/fish-shell`
  Line 16: - **Halt VMs that build successfully**
  Line 17: - **Leave VMs running if builds fail** (for debugging)

/nvme/code/rust/fish-shell/doc_internal/rust-devel.md:
  Line 3: This describes how to get started building fish-shell in its partial Rust state, and how to contribute to the port.
  Line 7: fish is in the process of transitioning from C++ to Rust. The fish project has a Rust crate embedded at path `fish-rust`. This crate builds a Rust library `libfish_rust.a` which is linked with the C++ `libfish.a`. Existing C++ code will be incrementally migrated to this crate; then CMake will be replaced with cargo and other Rust-native tooling.
  Line 11: 1. [Corrosion](https://github.com/corrosion-rs/corrosion) to invoke cargo from CMake.
  Line 17: ## Building
  Line 19: ### Build Dependencies
  Line 21: fish-shell currently depends on Rust 1.85 or later. To install Rust, follow https://rustup.rs.
  Line 23: ### Build via CMake
  Line 25: It is recommended to build inside `fish-shell/build`. This will make it easier for Rust to find the `config.h` file.
  Line 27: Build via CMake as normal (use any generator, here we use Ninja):
  Line 31: $ mkdir build && cd build
  Line 32: $ cmake -G Ninja ..
  Line 38: ### Build just libfish_rust.a with Cargo
  Line 40: The directory `fish-rust` contains the Rust sources. These require that CMake has been run to produce `config.h` which is necessary for autocxx to succeed.
  Line 42: Follow the "Build from CMake" steps above, and then:
  Line 46: $ cargo build
  Line 49: This will build only the library, not a fu...
12,254in / 209out / 58reasoning
assistantFeb 10, 02:51:59 PM
gpt-5.3-codex · openai
**Expanding doc file search**
globcompleted
Output
/nvme/code/rust/fish-shell/CONTRIBUTING.rst
/nvme/code/rust/fish-shell/README.rst
/nvme/code/rust/fish-shell/updatecli.d/docker.yml
/nvme/code/rust/fish-shell/vagrants/bsds/README.md
/nvme/code/rust/fish-shell/share/completions/docker.fish
/nvme/code/rust/fish-shell/share/completions/doctl.fish
/nvme/code/rust/fish-shell/docker/docker_run_tests.sh
/nvme/code/rust/fish-shell/crates/printf/README.md
/nvme/code/rust/fish-shell/contrib/debian/doc-base
/nvme/code/rust/fish-shell/contrib/debian/docs
globcompleted
Output
No files found
grepcompleted
(CMAKE_INSTALL_PREFIX|DATADIR|SYSCONFDIR|XDG|share/fish|vendor_completions|vendor_functions|vendor_conf|fish_complete_path|fish_function_path|fish_conf_path|extra|install)
Output
Found 46 matches
/nvme/code/rust/fish-shell/cmake/Install.cmake:
  Line 3: set(prefix ${CMAKE_INSTALL_PREFIX})
  Line 5: set(sysconfdir ${CMAKE_INSTALL_SYSCONFDIR})
  Line 8: set(datadir ${CMAKE_INSTALL_FULL_DATADIR})
  Line 9: file(RELATIVE_PATH rel_datadir ${CMAKE_INSTALL_PREFIX} ${datadir})
  Line 13: set(rel_completionsdir "fish/vendor_completions.d")
  Line 14: set(rel_functionsdir "fish/vendor_functions.d")
  Line 15: set(rel_confdir "fish/vendor_conf.d")
  Line 17: set(extra_completionsdir
  Line 19:     CACHE STRING "Path for extra completions")
  Line 21: set(extra_functionsdir
  Line 23:     CACHE STRING "Path for extra functions")
  Line 25: set(extra_confdir
  Line 27:     CACHE STRING "Path for extra configuration")
  Line 45: # Determine which man page we don't want to install.
  Line 46: # On OS X, don't install a man page for open, since we defeat fish's open
  Line 48: # On other operating systems, don't install a realpath man page, as they almost all have a realpath
  Line 59:     install(DIRECTORY DESTINATION ${dir})
  Line 66:       set(abs_dir "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dir}")
  Line 70:     install(SCRIPT CODE "EXECUTE_PROCESS(COMMAND mkdir -p ${abs_dir} OUTPUT_QUIET ERROR_QUIET)
  Line 76: install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fish
  Line 82:   set(abs_bindir "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${bindir}")
  Line 86: install(CODE "file(CREATE_LINK ${abs_bindir}/fish ${abs_bindir}/fish_indent)")
  Line 87: install(CODE "file(CREATE_LINK ${abs_bindir}/fish ${abs_bindir}/fish_key_reader)")
  Line 91: install(FILES etc/config.fish DESTINATION ${sysconfdir}/fish/)
  Line 103: install(FILES share/config.fish
  Line 108: fish_create_dirs(${rel_datadir}/fish/vendor_completions.d ${rel_datadir}/fish/vendor_functions.d
  Line 109:     ${rel_datadir}/fish/vendor_conf.d)
  Line 123: install(FILES ${CMAKE_CURRENT_BINARY_DIR}/fish.pc
  Line 126: install(DIRECTORY share/completions/
  Line 130: install(DIRECTORY share/functions/
  L...
grepcompleted
(vendor|completions|functions|conf.d|sysconf|XDG_DATA_DIRS|CMAKE_INSTALL_PREFIX|DESTDIR)
Output
Found 100 matches
/nvme/code/rust/fish-shell/doc_src/cmds/bind.rst:
  Line 58: ``COMMAND`` can be any fish command, but it can also be one of a set of special input functions. These include functions for moving the cursor, operating on the kill-ring, performing tab completion, etc. Use ``bind --function-names`` or :ref:`see below <special-input-functions>` for a list of these input functions.
  Line 72:     Display a list of available input functions
  Line 114: .. _special-input-functions:
  Line 116: Special input functions
  Line 118: The following special input functions are available:
  Line 121:     only execute the next function if the previous succeeded (note: only some functions report success)
  Line 199: .. _special-input-functions-scrollback-push:
  Line 384:     only execute the next function if the previous did not succeed (note: only some functions report failure)
  Line 387:     toggles the search field if the completions pager is visible; or if used after ``history-pager``, search forwards in time.
  Line 393:     reexecutes the prompt functions and redraws the prompt (also ``force-repaint`` for backwards-compatibility)
  Line 450: Additional functions
  Line 452: The following functions are included as normal functions, but are particularly useful for input editing:

/nvme/code/rust/fish-shell/CHANGELOG.rst:
  Line 32: - New special input functions to support these movements: ``forward-word-vi``, ``kill-word-vi``, ``forward-bigword-vi``, ``kill-bigword-vi``, ``forward-word-end``, ``backward-word-end``, ``forward-bigword-end``, ``backward-bigword-end``, ``kill-a-word``, ``kill-inner-word``, ``kill-a-bigword``, and ``kill-inner-bigword``.
  Line 65: - The ``abbr``, ``bind``, ``complete``, ``functions``, ``history`` and ``type`` commands now support a ``--color`` option to control syntax highlighting in their output. Valid values are ``auto`` (default), ``always``, or ``never``.
  Line 74: - ``extra_functionsdir`` (usually ``vendor_functions.d``) and ...
1,700in / 302out / 73reasoning
assistantFeb 10, 02:52:05 PM
gpt-5.3-codex · openai
**Planning build/install info gathering**
batchcompleted
Batch execution (5/5 successful)
Output
All 5 tools executed successfully.

Keep using the batch tool for optimal performance in your next response!
readcompleted
README.rst
Output
<file>
00001| .. |Cirrus CI| image:: https://api.cirrus-ci.com/github/fish-shell/fish-shell.svg?branch=master
00002|       :target: https://cirrus-ci.com/github/fish-shell/fish-shell
00003|       :alt: Cirrus CI Build Status
00004| 
00005| `fish <https://fishshell.com/>`__ - the friendly interactive shell |Build Status| |Cirrus CI|
00006| =============================================================================================
00007| 
00008| fish is a smart and user-friendly command line shell for macOS, Linux,
00009| and the rest of the family. fish includes features like syntax
00010| highlighting, autosuggest-as-you-type, and fancy tab completions that
00011| just work, with no configuration required.
00012| 
00013| For downloads, screenshots and more, go to https://fishshell.com/.
00014| 
00015| Quick Start
00016| -----------
00017| 
00018| fish generally works like other shells, like bash or zsh. A few
00019| important differences can be found at
00020| https://fishshell.com/docs/current/tutorial.html by searching for the
00021| magic phrase “unlike other shells”.
00022| 
00023| Detailed user documentation is available by running ``help`` within
00024| fish, and also at https://fishshell.com/docs/current/index.html
00025| 
00026| Getting fish
00027| ------------
00028| 
00029| macOS
00030| ~~~~~
00031| 
00032| fish can be installed:
00033| 
00034| -  using `Homebrew <http://brew.sh/>`__: ``brew install fish``
00035| -  using `MacPorts <https://www.macports.org/>`__:
00036|    ``sudo port install fish``
00037| -  using the `installer from fishshell.com <https://fishshell.com/>`__
00038| -  as a `standalone app from fishshell.com <https://fishshell.com/>`__
00039| 
00040| Note: The minimum supported macOS version is 10.12.
00041| 
00042| Packages for Linux
00043| ~~~~~~~~~~~~~~~~~~
00044| 
00045| Packages for Debian, Fedora, openSUSE, and Red Hat Enterprise
00046| Linux/CentOS are available from the `openSUSE Build
00047| Service <https://software.opensuse.or...
readcompleted
CONTRIBUTING.rst
Output
<file>
00001| ####################
00002| Contributing To Fish
00003| ####################
00004| 
00005| This document tells you how you can contribute to fish.
00006| 
00007| Fish is free and open source software, distributed under the terms of the GPLv2.
00008| 
00009| Contributions are welcome, and there are many ways to contribute!
00010| 
00011| Whether you want to change some of the core Rust source, enhance or add a completion script or function,
00012| improve the documentation or translate something, this document will tell you how.
00013| 
00014| 
00015| Mailing List
00016| ============
00017| 
00018| Send patches to the public mailing list: mailto:~krobelus/fish-shell@lists.sr.ht.
00019| Archives are available at https://lists.sr.ht/~krobelus/fish-shell/.
00020| 
00021| GitHub
00022| ======
00023| 
00024| Fish is available on GitHub, at https://github.com/fish-shell/fish-shell.
00025| 
00026| First, you'll need an account there, and you'll need a git clone of fish.
00027| Fork it on GitHub and then run::
00028| 
00029|   git clone https://github.com/<USERNAME>/fish-shell.git
00030| 
00031| This will create a copy of the fish repository in the directory fish-shell in your current working directory.
00032| 
00033| Also, for most changes you want to run the tests and so you'd get a setup to compile fish.
00034| For that, you'll require:
00035| 
00036| -  Rust - when in doubt, try rustup
00037| -  CMake
00038| -  PCRE2 (headers and libraries) - optional, this will be downloaded if missing
00039| -  gettext (only the msgfmt tool) - optional, for translation support
00040| -  Sphinx - optional, to build the documentation
00041| 
00042| Of course not everything is required always - if you just want to contribute something to the documentation you'll just need Sphinx,
00043| and if the change is very simple and obvious you can just send it in. Use your judgement!
00044| 
00045| Once you have your changes, open a pull request on https://github.com/fish-shell/fish...
readcompleted
cmake/Install.cmake
Output
<file>
00001| set(CMAKE_INSTALL_MESSAGE NEVER)
00002| 
00003| set(prefix ${CMAKE_INSTALL_PREFIX})
00004| set(bindir ${CMAKE_INSTALL_BINDIR})
00005| set(sysconfdir ${CMAKE_INSTALL_SYSCONFDIR})
00006| set(mandir ${CMAKE_INSTALL_MANDIR})
00007| 
00008| set(datadir ${CMAKE_INSTALL_FULL_DATADIR})
00009| file(RELATIVE_PATH rel_datadir ${CMAKE_INSTALL_PREFIX} ${datadir})
00010| 
00011| set(docdir ${CMAKE_INSTALL_DOCDIR})
00012| 
00013| set(rel_completionsdir "fish/vendor_completions.d")
00014| set(rel_functionsdir "fish/vendor_functions.d")
00015| set(rel_confdir "fish/vendor_conf.d")
00016| 
00017| set(extra_completionsdir
00018|     "${datadir}/${rel_completionsdir}"
00019|     CACHE STRING "Path for extra completions")
00020| 
00021| set(extra_functionsdir
00022|     "${datadir}/${rel_functionsdir}"
00023|     CACHE STRING "Path for extra functions")
00024| 
00025| set(extra_confdir
00026|     "${datadir}/${rel_confdir}"
00027|     CACHE STRING "Path for extra configuration")
00028| 
00029| 
00030| # These are the man pages that go in system manpath; all manpages go in the fish-specific manpath.
00031| set(MANUALS ${SPHINX_OUTPUT_DIR}/man/man1/fish.1
00032|             ${SPHINX_OUTPUT_DIR}/man/man1/fish_indent.1
00033|             ${SPHINX_OUTPUT_DIR}/man/man1/fish_key_reader.1
00034|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-doc.1
00035|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-tutorial.1
00036|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-language.1
00037|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-interactive.1
00038|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-terminal-compatibility.1
00039|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-completions.1
00040|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-prompt-tutorial.1
00041|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-for-bash-users.1
00042|             ${SPHINX_OUTPUT_DIR}/man/man1/fish-faq.1
00043| )
00044| 
00045| # Determine which man page we don't want to install.
00046| # On OS X, do...
readcompleted
CMakeLists.txt
Output
<file>
00001| cmake_minimum_required(VERSION 3.15)
00002| 
00003| list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
00004| 
00005| project(fish LANGUAGES C)
00006| set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
00007| 
00008| set(DEFAULT_BUILD_TYPE "RelWithDebInfo")
00009| 
00010| if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
00011|     message(STATUS "Setting build type to default '${DEFAULT_BUILD_TYPE}'")
00012|     set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
00013| endif()
00014| 
00015| # Set up standard directories.
00016| include(GNUInstallDirs)
00017| 
00018| # Set up PCRE2
00019| # This sets an environment variable that needs to be available before the Rust stanzas
00020| include(cmake/PCRE2.cmake)
00021| 
00022| include(cmake/Rust.cmake)
00023| 
00024| # Work around issue where archive-built libs go in the wrong place.
00025| set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
00026| 
00027| find_program(SPHINX_EXECUTABLE NAMES sphinx-build
00028|     HINTS
00029|     $ENV{SPHINX_DIR}
00030|     PATH_SUFFIXES bin
00031|     DOC "Sphinx documentation generator")
00032| 
00033| 
00034| # Tell Cargo where our build directory is so it can find Cargo.toml.
00035| set(VARS_FOR_CARGO
00036|     "FISH_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}"
00037|     "PREFIX=${CMAKE_INSTALL_PREFIX}"
00038|     "DOCDIR=${CMAKE_INSTALL_FULL_DOCDIR}"
00039|     "DATADIR=${CMAKE_INSTALL_FULL_DATADIR}"
00040|     "SYSCONFDIR=${CMAKE_INSTALL_FULL_SYSCONFDIR}"
00041|     "BINDIR=${CMAKE_INSTALL_FULL_BINDIR}"
00042|     "CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}"
00043|     "CARGO_BUILD_RUSTC=${Rust_COMPILER}"
00044|     "${FISH_PCRE2_BUILDFLAG}"
00045|     "FISH_SPHINX=${SPHINX_EXECUTABLE}"
00046| )
00047| 
00048| # Let fish pick up when we're running out of the build directory without installing
00049| get_filename_component(REAL_CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}" REALPATH)
00050| get_filename_component(REAL_CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH)
000...
readcompleted
doc_internal/rust-devel.md
Output
<file>
00001| # fish-shell Rust Development Guide
00002| 
00003| This describes how to get started building fish-shell in its partial Rust state, and how to contribute to the port.
00004| 
00005| ## Overview
00006| 
00007| fish is in the process of transitioning from C++ to Rust. The fish project has a Rust crate embedded at path `fish-rust`. This crate builds a Rust library `libfish_rust.a` which is linked with the C++ `libfish.a`. Existing C++ code will be incrementally migrated to this crate; then CMake will be replaced with cargo and other Rust-native tooling.
00008| 
00009| Important tools used during this transition:
00010| 
00011| 1. [Corrosion](https://github.com/corrosion-rs/corrosion) to invoke cargo from CMake.
00012| 2. [cxx](http://cxx.rs) for basic C++ <-> Rust interop.
00013| 3. [autocxx](https://google.github.io/autocxx/) for using C++ types in Rust.
00014| 
00015| We use forks of the last two - see the [FFI section](#ffi) below. No special action is required to obtain these packages. They're downloaded by cargo.
00016| 
00017| ## Building
00018| 
00019| ### Build Dependencies
00020| 
00021| fish-shell currently depends on Rust 1.85 or later. To install Rust, follow https://rustup.rs.
00022| 
00023| ### Build via CMake
00024| 
00025| It is recommended to build inside `fish-shell/build`. This will make it easier for Rust to find the `config.h` file.
00026| 
00027| Build via CMake as normal (use any generator, here we use Ninja):
00028| 
00029| ```shell
00030| $ cd fish-shell
00031| $ mkdir build && cd build
00032| $ cmake -G Ninja ..
00033| $ ninja
00034| ```
00035| 
00036| This will create the usual fish executables.
00037| 
00038| ### Build just libfish_rust.a with Cargo
00039| 
00040| The directory `fish-rust` contains the Rust sources. These require that CMake has been run to produce `config.h` which is necessary for autocxx to succeed.
00041| 
00042| Follow the "Build from CMake" steps above, and then:
00043| 
00044| ```shell
00045| $ cd fish-she...
5,959in / 223out / 77reasoning
assistantFeb 10, 02:52:10 PM
gpt-5.3-codex · openai
**Analyzing terminal compatibility docs**
globcompleted
Output
/nvme/code/rust/fish-shell/doc_src/cmds/bind.rst
/nvme/code/rust/fish-shell/doc_src/cmds/fish_mode_prompt.rst
/nvme/code/rust/fish-shell/doc_src/interactive.rst
/nvme/code/rust/fish-shell/doc_src/terminal-compatibility.rst
/nvme/code/rust/fish-shell/doc_src/cmds/set_color.rst
/nvme/code/rust/fish-shell/doc_src/cmds/fish_vi_key_bindings.rst
/nvme/code/rust/fish-shell/doc_src/relnotes.rst
/nvme/code/rust/fish-shell/doc_src/tutorial.rst
/nvme/code/rust/fish-shell/doc_src/index.rst
/nvme/code/rust/fish-shell/doc_src/design.rst
/nvme/code/rust/fish-shell/doc_src/license.rst
/nvme/code/rust/fish-shell/doc_src/contributing.rst
/nvme/code/rust/fish-shell/doc_src/faq.rst
/nvme/code/rust/fish-shell/doc_src/language.rst
/nvme/code/rust/fish-shell/doc_src/completions.rst
/nvme/code/rust/fish-shell/doc_src/prompt.rst
/nvme/code/rust/fish-shell/doc_src/cmds/command.rst
/nvme/code/rust/fish-shell/doc_src/cmds/random.rst
/nvme/code/rust/fish-shell/doc_src/cmds/fish_title.rst
/nvme/code/rust/fish-shell/doc_src/cmds/fish_tab_title.rst
/nvme/code/rust/fish-shell/doc_src/cmds/echo.rst
/nvme/code/rust/fish-shell/doc_src/cmds/cdh.rst
/nvme/code/rust/fish-shell/doc_src/cmds/block.rst
/nvme/code/rust/fish-shell/doc_src/cmds/continue.rst
/nvme/code/rust/fish-shell/doc_src/cmds/case.rst
/nvme/code/rust/fish-shell/doc_src/cmds/string-upper.rst
/nvme/code/rust/fish-shell/doc_src/cmds/if.rst
/nvme/code/rust/fish-shell/doc_src/cmds/read.rst
/nvme/code/rust/fish-shell/doc_src/cmds/nextd.rst
/nvme/code/rust/fish-shell/doc_src/cmds/_.rst
/nvme/code/rust/fish-shell/doc_src/cmds/string-repeat.rst
/nvme/code/rust/fish-shell/doc_src/cmds/string-length.rst
/nvme/code/rust/fish-shell/doc_src/cmds/abbr.rst
/nvme/code/rust/fish-shell/doc_src/cmds/fish_clipboard_copy.rst
/nvme/code/rust/fish-shell/doc_src/cmds/string-shorten.rst
/nvme/code/rust/fish-shell/doc_src/cmds/exit.rst
/nvme/code/rust/fish-shell/doc_src/cmds/type.rst
/nvme/code/rust/fish-shell/doc_src/cmds/string-trim.rst
/nvme/code/rust/fish-shell/...
grepcompleted
(tmux|foot|terminal compatibility|terminfo|fish_complete_path|fish_function_path|fish_conf_path|vendor_completions|vendor_functions|vendor_conf|XDG_DATA_DIRS|/etc/fish|/usr/local/share/fish)
Output
Found 33 matches
/nvme/code/rust/fish-shell/doc_src/terminal-compatibility.rst:
  Line 18: **NOTE:** fish does not rely on your system's terminfo database.
  Line 19: In this document, terminfo (TI) codes are included for reference only.
  Line 171:      - Scroll up the content (not the viewport) Ps lines (called ``SCROLL UP`` / ``SU`` by ECMA-48 and "scroll forward" by terminfo).
  Line 287:      - Request terminfo capability (XTGETTCAP).
  Line 288:        The parameter is the capability's hex-encoded terminfo code.

/nvme/code/rust/fish-shell/doc_src/interactive.rst:
  Line 57: Completion scripts are loaded on demand, like :ref:`functions are <syntax-function-autoloading>`. The difference is the ``$fish_complete_path`` :ref:`list <variables-lists>` is used instead of ``$fish_function_path``. Typically you can drop new completions in ~/.config/fish/completions/name-of-command.fish and fish will find them automatically.

/nvme/code/rust/fish-shell/doc_src/tutorial.rst:
  Line 734: See the documentation for :doc:`funced <cmds/funced>` and :doc:`funcsave <cmds/funcsave>` for ways to create these files automatically, and :ref:`$fish_function_path <syntax-function-autoloading>` to control their location.

/nvme/code/rust/fish-shell/doc_src/cmds/path.rst:
  Line 302:     >_ path normalize /usr/bin//../../etc/fish
  Line 304:     /etc/fish
  Line 420:    >_ path sort --unique --key=basename $fish_function_path/*.fish

/nvme/code/rust/fish-shell/doc_src/cmds/fish_delta.rst:
  Line 19: It does this by going through the relevant variables (:envvar:`fish_function_path` for functions and :envvar:`fish_complete_path` for completions) and comparing the files against fish's default directories.

/nvme/code/rust/fish-shell/doc_src/faq.rst:
  Line 317: The same applies for example when you start ``tmux`` in config.fish without guards, which will cause a message like ``sessions should be nested with care, unset $TMUX to force``.
  Line 355:     rm -Rf /usr/local/etc/fish /usr/local...
grepcompleted
(fish_complete_path|fish_function_path|fish_conf_path|vendor_completions|vendor_functions|vendor_conf|XDG_DATA_DIRS|XDG_CONFIG_HOME|sysconfdir|datadir)
Output
Found 57 matches
/nvme/code/rust/fish-shell/share/completions/git.fish:
  Line 2666:             __fish_complete_path

/nvme/code/rust/fish-shell/share/completions/pacman.fish:
  Line 34:         __fish_complete_path $target

/nvme/code/rust/fish-shell/share/completions/quilt.fish:
  Line 77:     printf '%s\n' (__fish_complete_path (commandline -ct))\t'Custom Filter'

/nvme/code/rust/fish-shell/share/completions/pandoc.fish:
  Line 8: set -l datadir $HOME/.pandoc
  Line 93: complete -c pandoc -r -s F -l filter -a "(find $datadir/filters -type f 2>/dev/null | string replace -- '$datadir/filters/' '')"
  Line 94: complete -c pandoc -r -l template -a "(find $datadir/templates -type f 2>/dev/null | string replace -- '$datadir/templates/' '')"
  Line 95: complete -c pandoc -r -f -l lua-filter -a "(find $datadir -type f 2>/dev/null | string match -r '.lua\$' | string replace -- '$datadir/' '')"

/nvme/code/rust/fish-shell/share/functions/man.fish:
  Line 22:         # by prepending our fish datadir to man. This also ensures that man gives fish's

/nvme/code/rust/fish-shell/share/functions/__fish_complete_path.fish:
  Line 2: function __fish_complete_path --description "Complete using path"

/nvme/code/rust/fish-shell/share/functions/__fish_set_locale.fish:
  Line 54:     set -l user_cfg_dir (set -q XDG_CONFIG_HOME; and echo $XDG_CONFIG_HOME; or echo ~/.config)

/nvme/code/rust/fish-shell/share/functions/__fish_print_xdg_applications_directories.fish:
  Line 8:     set -l data_dirs $XDG_DATA_DIRS

/nvme/code/rust/fish-shell/share/functions/fish_delta.fish:
  Line 24:     test "$vendormode" = default && set -a default_function_path $__fish_vendor_functionsdirs
  Line 27:     test "$vendormode" = default && set -a default_complete_path $__fish_vendor_completionsdirs
  Line 30:     test "$vendormode" = default && set -a default_conf_path $__fish_vendor_confdirs
  Line 35:     test "$vendormode" = user && set -a user_conf_path $__fish_vendor_confdirs
  Line 37:     for dir in ...
15,296in / 343out / 135reasoning
assistantFeb 10, 02:52:18 PM
gpt-5.3-codex · openai
**Planning detailed build and install guidance**

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.

6,045in / 1,526out / 822reasoning
userFeb 10, 02:57:32 PM
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. 

I'm on debian, and /usr is fine as I want to overwrite any system installs (i've removed the debian pkg managers fish)

assistantFeb 10, 02:57:32 PM
gpt-5.3-codex · openai
**Drafting Debian install instructions**

Perfect - Debian + /usr is straightforward.

Debian Commands

# 1) Build deps
sudo apt update
sudo apt install -y \
  build-essential cmake ninja-build pkg-config \
  rustc cargo \
  libpcre2-dev gettext \
  python3-sphinx

# Optional but recommended for validation/tests
sudo apt install -y git diffutils python3-pexpect less tmux wget
# 2) Configure (install prefix=/usr, system config in /etc)
cmake -S . -B build -G Ninja \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_INSTALL_SYSCONFDIR=/etc \
  -DCMAKE_INSTALL_DATADIR=share \
  -DCMAKE_INSTALL_BINDIR=bin \
  -DWITH_DOCS=ON \
  -DWITH_MESSAGE_LOCALIZATION=ON \
  -DFISH_USE_SYSTEM_PCRE2=ON

# 3) Build
cmake --build build -j"$(nproc)"

# 4) Install (overwrites same-path fish files under /usr)
sudo cmake --install build

Where things will land

  • Binary: /usr/bin/fish
  • System-wide config: /etc/fish/config.fish, /etc/fish/conf.d/
  • Shipped completions/functions: /usr/share/fish/completions, /usr/share/fish/functions
  • Vendor drop-ins (for extra system-wide snippets):
    /usr/share/fish/vendor_completions.d, /usr/share/fish/vendor_functions.d, /usr/share/fish/vendor_conf.d

Post-install checks

command -v -a fish
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'

tmux/foot note

  • In tmux, set default-terminal to tmux-256color and enable truecolor overrides if needed; fish itself is generally fine in foot -> tmux -> fish.

If you want, I can also give you a clean Debian tmux.conf snippet tuned specifically for foot + fish key behavior/colors.

28,336in / 911out / 414reasoning