mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 11:31:15 -03:00
Make fish installable
When built with the default "installable" feature, the data files (share/) are included in the fish binary itself. Run `fish --install` or `fish --install=noconfirm` (for non-interactive use) to install fish's data files into ~/.local/share/fish/install To figure out if the data files are out of date, we write the current version to a file on install, and read it on start. CMake disables the default features so nothing changes for that, but this allows installing via `cargo install`, and even making a static binary that you can then just upload and have extract itself. We set $__fish_help_dir to empty for installable builds, because we do not have a way to generate html docs (because we need fish_indent for highlighting). The man pages are found via $__fish_data_dir/man
This commit is contained in:
@@ -181,7 +181,7 @@ function help --description 'Show help for the fish shell'
|
||||
set -l version_string (string split . -f 1,2 -- $version | string join .)
|
||||
set -l ext_url https://fishshell.com/docs/$version_string/$fish_help_page
|
||||
set -l page_url
|
||||
if test -f $__fish_help_dir/index.html; and not set -lq chromeos_linux_garcon
|
||||
if set -q __fish_help_dir[1]; and test -f $__fish_help_dir/index.html; and not set -lq chromeos_linux_garcon
|
||||
# Help is installed, use it
|
||||
set page_url file://$__fish_help_dir/$fish_help_page
|
||||
|
||||
|
||||
Reference in New Issue
Block a user