aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc_src/doc.hdr14
-rw-r--r--etc/fish_interactive.fish.in7
-rw-r--r--share/fish.in14
3 files changed, 27 insertions, 8 deletions
diff --git a/doc_src/doc.hdr b/doc_src/doc.hdr
index 5bcca19d..3ccba190 100644
--- a/doc_src/doc.hdr
+++ b/doc_src/doc.hdr
@@ -777,6 +777,7 @@ certain environment variables.
- \c BROWSER, which is the users preferred web browser. If this variable is set, fish will use the specified browser instead of the system default browser to display the fish documentation.
- \c CDPATH, which is an array of directories in which to search for the new directory for the \c cd builtin.
- A large number of variable starting with the prefixes \c fish_color and \c fish_pager_color. See <a href='#variables-color'>Variables for changing highlighting colors</a> for more information.
+- \c fish_greeting, which is the greeting message printed on startup.
- \c LANG, \c LC_ALL, \c LC_COLLATE, \c LC_CTYPE, \c LC_MESSAGES, \c LC_MONETARY, \c LC_NUMERIC and \c LC_TIME set the language option for the shell and subprograms. See the section <a href='#variables-locale'>Locale variables</a> for more information.
- \c PATH, which is an array of directories in which to search for commands
- \c umask, which is the current file creation mask. The preferred way to change the umask variable is through the <a href="commands.html#umask">umask shellscript function</a>. An attempt to set umask to an invalid value will always fail.
@@ -2490,6 +2491,7 @@ DAMAGES.
- <a href='#faq-open'>The open command doesn't work.</a>
- <a href='#faq-default'>How do I make fish my default shell?</a>
- <a href='#faq-titlebar'>I'm seeing weird output before each prompt when using screen. What's wrong?</a>
+- <a href='#faq-greeting'>How do I change the greeting message?</a>
<hr>
@@ -2603,4 +2605,16 @@ You may need to adjust the above path to e.g. /usr/local/bin/fish.
You will need to log out and back in again for the change to take
effect.
+<hr>
+
+\section faq-greeting How do I change the greeting message?
+
+Change the value of the variable fish_greeting. For example, to remove
+the greeting use:
+
+<pre>
+set fish_greeting
+</pre>
+
+
*/
diff --git a/etc/fish_interactive.fish.in b/etc/fish_interactive.fish.in
index 0e5d5543..4e96daba 100644
--- a/etc/fish_interactive.fish.in
+++ b/etc/fish_interactive.fish.in
@@ -8,13 +8,6 @@ if not status --is-interactive
end
#
-# Print a greeting
-#
-
-printf (_ 'Welcome to fish, the friendly interactive shell\n')
-printf (_ 'Type %shelp%s for instructions on how to use fish\n') (set_color green) (set_color normal)
-
-#
# Set exit message
#
diff --git a/share/fish.in b/share/fish.in
index b1d88b78..8b1feead 100644
--- a/share/fish.in
+++ b/share/fish.in
@@ -18,7 +18,6 @@ if not set -q fish_complete_path
set -U fish_complete_path ~/.fish.d/completions @sysconfdir@/fish.d/completions @datadir@/fish/completions
end
-
set __fish_help_dir @docdir@
# This is a Solaris-specific test to modify the PATH so that
@@ -75,6 +74,19 @@ for i in (printf "%s\n" $path_list|grep -E -v $path_regexp)
end
#
+# Print a greeting
+#
+
+if not set -q fish_greeting
+ set -l line1 (printf (_ 'Welcome to fish, the friendly interactive shell') )
+ set -l line2 (printf (_ 'Type %shelp%s for instructions on how to use fish') (set_color green) (set_color normal))
+ set -U fish_greeting $line1\n$line2
+end
+
+echo $fish_greeting
+
+
+#
# Don't need completions in non-interactive mode
#