Only load bash_completion.sh when interactive
This commit is contained in:
parent
5d3b354ec0
commit
1d9e33f1cd
2 changed files with 4 additions and 5 deletions
|
@ -81,11 +81,6 @@ then
|
||||||
PS1="\[\033[01m\]${_acp_ps1_prefix}\u@\h\\$\[\033[00m\] "
|
PS1="\[\033[01m\]${_acp_ps1_prefix}\u@\h\\$\[\033[00m\] "
|
||||||
unset _acp_ps1_prefix
|
unset _acp_ps1_prefix
|
||||||
|
|
||||||
if [ -r /etc/profile.d/bash_completion.sh ]
|
|
||||||
then
|
|
||||||
. /etc/profile.d/bash_completion.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
elif [ -n "$ZSH_VERSION" ]
|
elif [ -n "$ZSH_VERSION" ]
|
||||||
then
|
then
|
||||||
autoload -Uz compinit && compinit
|
autoload -Uz compinit && compinit
|
||||||
|
|
|
@ -7,6 +7,10 @@ fi
|
||||||
case "$-" in
|
case "$-" in
|
||||||
*i*)
|
*i*)
|
||||||
# Shell is interactive.
|
# Shell is interactive.
|
||||||
|
if [ -r /etc/profile.d/bash_completion.sh ]
|
||||||
|
then
|
||||||
|
. /etc/profile.d/bash_completion.sh
|
||||||
|
fi
|
||||||
usermotd
|
usermotd
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue