mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Add possibility to define greeting function, suggested by Chris Miller
darcs-hash:20090216210450-ac50b-9b4f7c5bf45afaf21d51e46ff8c2b11d171fcbf2.gz
This commit is contained in:
parent
79784d3e18
commit
07717a3570
2 changed files with 16 additions and 6 deletions
|
@ -1256,6 +1256,12 @@ end
|
|||
</pre>
|
||||
</p>
|
||||
|
||||
\subsection greeting Configurable greeting
|
||||
|
||||
If a function named fish_greeting exists after initialization, it will
|
||||
be run when entering interactive mode. Otherwise,if an environment
|
||||
variable named fish_greeting exists, it will be printed.
|
||||
|
||||
\subsection event Event handlers
|
||||
|
||||
When defining a new function in fish, it is possible to make it into an
|
||||
|
|
|
@ -146,6 +146,9 @@ function __fish_config_interactive -d "Initializations that should be performed
|
|||
# Print a greeting
|
||||
#
|
||||
|
||||
if functions -q fish_greeting
|
||||
fish_greeting
|
||||
else
|
||||
if set -q fish_greeting
|
||||
switch $fish_greeting
|
||||
case ''
|
||||
|
@ -155,6 +158,7 @@ function __fish_config_interactive -d "Initializations that should be performed
|
|||
echo $fish_greeting
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Set exit message
|
||||
|
|
Loading…
Reference in a new issue