mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Only print fish_greeting for interactive shells
Shell scripts that use `read` should not trigger fish_greeting. Fixes #1401.
This commit is contained in:
parent
4573a4d69c
commit
e1f623f548
1 changed files with 14 additions and 12 deletions
|
@ -149,6 +149,7 @@ function __fish_config_interactive -d "Initializations that should be performed
|
|||
eval "$__fish_bin_dir/fish -c 'fish_update_completions > /dev/null ^/dev/null' &"
|
||||
end
|
||||
|
||||
if status -i
|
||||
#
|
||||
# Print a greeting
|
||||
#
|
||||
|
@ -166,6 +167,7 @@ function __fish_config_interactive -d "Initializations that should be performed
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# This event handler makes sure the prompt is repainted when
|
||||
|
|
Loading…
Reference in a new issue