aboutsummaryrefslogtreecommitdiffhomepage
path: root/init
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-04 23:09:14 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-04 23:09:14 +1000
commit4f947015d25028db5b5f161d85bfd563a226c927 (patch)
treef197446387a2f3de57feb00e35bc6f1d78080916 /init
parent9f3a7543aa4442fedf56ff94150d38199e194cf4 (diff)
Minor tweaks, including a few small performance improvements
darcs-hash:20060204130914-ac50b-331e83fd8fe472545fce60fc4b76bb8300526d64.gz
Diffstat (limited to 'init')
-rw-r--r--init/fish.in5
-rw-r--r--init/fish_complete.fish.in2
-rw-r--r--init/fish_interactive.fish.in6
3 files changed, 9 insertions, 4 deletions
diff --git a/init/fish.in b/init/fish.in
index f47a695f..c67a4a5f 100644
--- a/init/fish.in
+++ b/init/fish.in
@@ -1,7 +1,7 @@
#
# Init file for fish
#
-
+# @configure_input@
#
# Set default field separators
@@ -18,8 +18,7 @@ set -g IFS \ \t\n
set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin @optbindirs@
# Root should also have the sbin directories in the path
-set -l uid (id -u 2>/dev/null)
-if test "$uid" = 0
+if test "$USER" = root
set path_list $path_list /sbin /usr/sbin /usr/local/sbin
end
diff --git a/init/fish_complete.fish.in b/init/fish_complete.fish.in
index 4d160b79..ac8b4056 100644
--- a/init/fish_complete.fish.in
+++ b/init/fish_complete.fish.in
@@ -1,6 +1,8 @@
# Main file for fish command completions. This file contains various
# common helper functions for the command completions. All actual
# completions are located in the completions subdirectory.
+#
+# @configure_input@
#
# Don't need completions in non-interactive mode
diff --git a/init/fish_interactive.fish.in b/init/fish_interactive.fish.in
index acb44c40..124e21a2 100644
--- a/init/fish_interactive.fish.in
+++ b/init/fish_interactive.fish.in
@@ -1,6 +1,7 @@
#
# Initializations that should only be performed when in interactive mode
#
+# @configure_input@
if not status --is-interactive
exit
@@ -64,12 +65,14 @@ end
# Set various color values
#
+set -g all_colors (set_color -c)
+
function set_default_color -d "Set an universal variable, unless it has already been set. If set, verify that it is a valid color name"
if not set -q $argv[1]
set -U -- $argv
return
end
- if contains -- $$argv[1] (set_color -c)
+ if contains -- $$argv[1] $all_colors
return
end
set -U -- $argv
@@ -137,3 +140,4 @@ end
functions -e set_default_color
functions -e set_exported_default
+set -e all_colors