mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Revert "Only show greeting on interactive login sessions"
This reverts commit 3d0ea5fe79
.
This commit is contained in:
parent
5eedb0ee9c
commit
46fba342db
1 changed files with 27 additions and 8 deletions
|
@ -110,14 +110,13 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
# Print a greeting.
|
# Print a greeting.
|
||||||
# fish_greeting can be a function (preferred) or a variable.
|
# fish_greeting can be a function (preferred) or a variable.
|
||||||
#
|
#
|
||||||
if status --is-interactive and status --is-login
|
if functions -q fish_greeting
|
||||||
if functions -q fish_greeting
|
fish_greeting
|
||||||
fish_greeting
|
else
|
||||||
else
|
# The greeting used to be skipped when fish_greeting was empty (not just undefined)
|
||||||
# The greeting used to be skipped when fish_greeting was empty (not just undefined)
|
# Keep it that way to not print superfluous newlines on old configuration
|
||||||
# Keep it that way to not print superfluous newlines on old configuration
|
test -n "$fish_greeting"
|
||||||
test -n "$fish_greeting" echo $fish_greeting
|
and echo $fish_greeting
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -300,6 +299,26 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
set -g fish_pager_color_description yellow
|
set -g fish_pager_color_description yellow
|
||||||
set -g fish_pager_color_progress cyan
|
set -g fish_pager_color_progress cyan
|
||||||
|
|
||||||
|
# Don't allow setting color other than what linux offers (see #2001)
|
||||||
|
functions -e set_color
|
||||||
|
function set_color --shadow-builtin
|
||||||
|
set -l term_colors black red green yellow blue magenta cyan white normal
|
||||||
|
for a in $argv
|
||||||
|
if not contains -- $a $term_colors
|
||||||
|
switch $a
|
||||||
|
# Also allow options
|
||||||
|
case "-*"
|
||||||
|
continue
|
||||||
|
case "*"
|
||||||
|
echo "Color not valid in TERM = linux: $a"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
builtin set_color $argv
|
||||||
|
return $status
|
||||||
|
end
|
||||||
|
|
||||||
# Set fish_prompt to a VT-friendly version
|
# Set fish_prompt to a VT-friendly version
|
||||||
# without color or unicode
|
# without color or unicode
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
|
|
Loading…
Reference in a new issue