Fix showing Reading when non-interactive

This commit is contained in:
Anthony Rose 2022-08-23 13:26:48 +01:00
parent 7bba951c6f
commit 62d6db7ce3
3 changed files with 3 additions and 5 deletions

View file

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
case "$-" in case "$-" in
*i*) *i*)
echo "[ Reading \"$HOME/.bashrc\" ]"
;; ;;
*) *)
# Shell is not interactive. # Shell is not interactive.
@ -8,8 +9,6 @@ case "$-" in
;; ;;
esac esac
echo "[ Reading \"$HOME/.bashrc\" ]"
if [ -f /etc/bashrc ] if [ -f /etc/bashrc ]
then then
. /etc/bashrc . /etc/bashrc

View file

@ -4,10 +4,10 @@ then
echo "[ Ignoring \"$HOME/.shrc\" ]" echo "[ Ignoring \"$HOME/.shrc\" ]"
return 1 return 1
fi fi
echo "[ Reading \"$HOME/.shrc\" ]"
case "$-" in case "$-" in
*i*) *i*)
echo "[ Reading \"$HOME/.shrc\" ]"
;; ;;
*) *)
# Shell is not interactive. # Shell is not interactive.

View file

@ -1,6 +1,7 @@
#!/bin/zsh #!/bin/zsh
case "$-" in case "$-" in
*i*) *i*)
echo "[ Reading \"$HOME/.zshrc\" ]"
;; ;;
*) *)
# Shell is not interactive. # Shell is not interactive.
@ -8,8 +9,6 @@ case "$-" in
;; ;;
esac esac
echo "[ Reading \"$HOME/.zshrc\" ]"
if [ -f /etc/zshrc ] if [ -f /etc/zshrc ]
then then
. /etc/zshrc . /etc/zshrc