aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-22 01:37:01 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-22 01:37:01 +1000
commit328c3a39a10c2d561761072e240442383e5e71b6 (patch)
treea8f6ecf62e236451d5fa805f4840b5f80d0ce6b0 /share
parent5aa019a0b58473f69742235d4b7a814d1d957872 (diff)
Move _ shellscript function to it's own file
darcs-hash:20060221153701-ac50b-05cecdac1221e0abc709d9e9c1799faa7986fa78.gz
Diffstat (limited to 'share')
-rw-r--r--share/fish26
-rw-r--r--share/functions/_.fish15
2 files changed, 20 insertions, 21 deletions
diff --git a/share/fish b/share/fish
index e2e592e0..137f4892 100644
--- a/share/fish
+++ b/share/fish
@@ -7,28 +7,8 @@
#
# Assign a temporary value here for performance reasons. The real value should be set in /etc/fish.
#
-set -g fish_function_path
-#
-# Don't need completions in non-interactive mode
-#
-
-#
-# Alias for gettext (or a fallback if gettext isn't installed) This
-# needs to be defined here and not in fish_function.fish, since it is
-# used by other init files.
-#
-
-function _ -d "Alias for the gettext command"
- printf "%s" $argv
-end
-if test 1 = "1"
- if which gettext ^/dev/null >/dev/null
- function _ -d "Alias for the gettext command"
- gettext fish $argv
- end
- end
-end
+set -g fish_function_path $PWD/functions/
#
# Set some value for LANG if nothing was set before, and this is a
@@ -45,6 +25,10 @@ if status --is-login
end
end
+#
+# Don't need completions in non-interactive mode
+#
+
if not status --is-interactive
exit
end
diff --git a/share/functions/_.fish b/share/functions/_.fish
new file mode 100644
index 00000000..33fdd43e
--- /dev/null
+++ b/share/functions/_.fish
@@ -0,0 +1,15 @@
+
+#
+# Alias for gettext (or a fallback if gettext isn't installed)
+#
+
+if which gettext ^/dev/null >/dev/null
+ function _ -d "Alias for the gettext command"
+ gettext fish $argv
+ end
+else
+ function _ -d "Alias for the gettext command"
+ printf "%s" $argv
+ end
+end
+