aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-08 15:20:39 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-08 15:20:39 -0700
commit4912967eabc447c31847566f03c50433015e9e9c (patch)
tree939f1d16354f08da8f11b4489e31b38a57022df9 /share
parent76e1cda495d6e88cea383d387375588cdf9297bc (diff)
Large set of changes related to making fish relocatable, and improving the build and install story.
- etc/config.fish and share/config.fish are now "universal" and no longer reference install paths or need to be touched by autotools. They've been removed from config.fish.in to config.fish. - fish now attempts to determine __fish_datadir and __fish_sysconfdir relative to the path of the fish executable itself (typically by walking up one directory). This means that you can copy the directory hierarchy around and things will still work. The compiled-in paths are used as a backup. - The fish Xcode project now can build fish natively, without needing autotools. - Version bumped to 2.0
Diffstat (limited to 'share')
-rw-r--r--share/config.fish (renamed from share/config.fish.in)29
1 files changed, 10 insertions, 19 deletions
diff --git a/share/config.fish.in b/share/config.fish
index dc1c0f07..af2e15cb 100644
--- a/share/config.fish.in
+++ b/share/config.fish
@@ -3,7 +3,6 @@
# common helper functions for the command completions. All actual
# completions are located in the completions subdirectory.
#
-# @configure_input@
#
# Set default field separators
@@ -22,36 +21,28 @@ if set -q XDG_CONFIG_HOME
set configdir $XDG_CONFIG_HOME
end
-# These are used internally by fish in various places
-if not set -q __fish_datadir
- set -g __fish_datadir @datadir@/fish
-end
-
-if not set -q __fish_sysconfdir
- set -g __fish_sysconfdir @sysconfdir@/fish
-end
+# __fish_datadir, __fish_sysconfdir, __fish_help_dir, __fish_bin_dir
+# are expected to have been set up by read_init from fish.cpp
# Set up function and completion paths. Make sure that the fish
# default functions/completions are included in the respective path.
if not set -q fish_function_path
- set -U fish_function_path $configdir/fish/functions @sysconfdir@/fish/functions @datadir@/fish/functions
+ set fish_function_path $configdir/fish/functions $__fish_sysconfdir/functions $__fish_datadir/functions
end
-if not contains @datadir@/fish/functions $fish_function_path
- set fish_function_path[-1] @datadir@/fish/functions
+if not contains $__fish_datadir/functions $fish_function_path
+ set fish_function_path[-1] $__fish_datadir/functions
end
if not set -q fish_complete_path
- set -U fish_complete_path $configdir/fish/completions @sysconfdir@/fish/completions @datadir@/fish/completions
+ set fish_complete_path $configdir/fish/completions $__fish_sysconfdir/completions $__fish_datadir/completions
end
-if not contains @datadir@/fish/completions $fish_complete_path
- set fish_complete_path[-1] @datadir@/fish/completions
+if not contains $__fish_datadir/completions $fish_complete_path
+ set fish_complete_path[-1] $__fish_datadir/completions
end
-set __fish_help_dir @docdir@
-
#
# This is a Solaris-specific test to modify the PATH so that
# Posix-conformant tools are used by default. It is separate from the
@@ -72,12 +63,12 @@ end
# want this even for text-only terminals.
#
-set -l path_list /bin /usr/bin /usr/X11R6/bin /usr/local/bin @prefix@/bin @optbindirs@
+set -l path_list /bin /usr/bin /usr/X11R6/bin /usr/local/bin $__fish_bin_dir
# Root should also have the sbin directories in the path
switch $USER
case root
- set path_list $path_list /sbin /usr/sbin /usr/local/sbin @prefix@/sbin
+ set path_list $path_list /sbin /usr/sbin /usr/local/sbin
end
for i in $path_list