Clean up loading of shell files

This commit is contained in:
Anthony Rose 2022-09-08 10:31:44 +01:00
parent 97e9200841
commit 829c67ab1b
6 changed files with 1 additions and 71 deletions

View file

@ -1,22 +1,7 @@
#!/bin/bash #!/bin/bash
if [ -r /usr/local/etc/bash_profile ]
then
. /usr/local/etc/bash_profile
elif [ -r /etc/bash_profile ]
then
. /etc/bash_profile
fi
export BASH_ENV="$HOME/.bashrc"
export _acp_ignore_shrc=1
if [ -r "$HOME/.profile" ] if [ -r "$HOME/.profile" ]
then then
. "$HOME/.profile" . "$HOME/.profile"
fi fi
unset _acp_ignore_shrc
if [ -r "$HOME/.bashrc" ] export BASH_ENV="$HOME/.bashrc"
then
. "$HOME/.bashrc"
fi

View file

@ -8,14 +8,6 @@ case "$-" in
;; ;;
esac esac
if [ -r /usr/local/etc/bashrc ]
then
. /usr/local/etc/bashrc
elif [ -r /etc/bashrc ]
then
. /etc/bashrc
fi
set -o emacs set -o emacs
set -o noclobber set -o noclobber
shopt -s histappend shopt -s histappend

View file

@ -1,12 +1,4 @@
#!/bin/sh #!/bin/sh
if [ -r /usr/local/etc/profile ]
then
. /usr/local/etc/profile
elif [ -r /etc/profile ]
then
. /etc/profile
fi
export ANSIBLE_NOCOWS=1 export ANSIBLE_NOCOWS=1
export BLOCKSIZE=K export BLOCKSIZE=K
export EDITOR=vi export EDITOR=vi
@ -32,10 +24,6 @@ export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp/.runtime-$(id -un)}"
# Locale and language. # Locale and language.
## Clear the existing locale settings and set options I always want. ## Clear the existing locale settings and set options I always want.
export TZ=Europe/London # Can override this elsewhere if needed. export TZ=Europe/London # Can override this elsewhere if needed.
if [ -r /etc/locale.conf ]
then
. /etc/locale.conf
fi
if [ -r "$XDG_CONFIG_HOME/locale.conf" ] if [ -r "$XDG_CONFIG_HOME/locale.conf" ]
then then
. "$XDG_CONFIG_HOME/locale.conf" . "$XDG_CONFIG_HOME/locale.conf"

View file

@ -1,8 +1,4 @@
#!/bin/sh #!/bin/sh
if [ -n "$_acp_ignore_shrc" ]
then
return 1
fi
if [ -n "$_acp_shrc_loaded" ] if [ -n "$_acp_shrc_loaded" ]
then then
return 1 return 1
@ -18,14 +14,6 @@ case "$-" in
;; ;;
esac esac
if [ -r /usr/local/etc/shrc ]
then
. /usr/local/etc/shrc
elif [ -r /etc/shrc ]
then
. /etc/shrc
fi
if [ -d /var/acp ] if [ -d /var/acp ]
then then
export ACP=/var/acp export ACP=/var/acp

View file

@ -1,20 +1,5 @@
#!/bin/zsh #!/bin/zsh
if [ -r /usr/local/etc/zprofile ]
then
. /usr/local/etc/zprofile ]
elif [ -r /etc/zprofile ]
then
. /etc/zprofile
fi
export _acp_ignore_shrc=1
if [ -r "$HOME/.profile" ] if [ -r "$HOME/.profile" ]
then then
emulate sh -c '. "$HOME/.profile"' emulate sh -c '. "$HOME/.profile"'
fi fi
unset _acp_ignore_shrc
if [ -r "$HOME/.zshrc" ]
then
. "$HOME/.zshrc"
fi

View file

@ -8,14 +8,6 @@ case "$-" in
;; ;;
esac esac
if [ -r /usr/local/etc/zshrc ]
then
. /usr/local/etc/zshrc
elif [ -r /etc/zshrc ]
then
. /etc/zshrc
fi
autoload -Uz compinit && compinit autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'