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
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" ]
then
. "$HOME/.profile"
fi
unset _acp_ignore_shrc
if [ -r "$HOME/.bashrc" ]
then
. "$HOME/.bashrc"
fi
export BASH_ENV="$HOME/.bashrc"

View file

@ -8,14 +8,6 @@ case "$-" in
;;
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 noclobber
shopt -s histappend

View file

@ -1,12 +1,4 @@
#!/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 BLOCKSIZE=K
export EDITOR=vi
@ -32,10 +24,6 @@ export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp/.runtime-$(id -un)}"
# Locale and language.
## Clear the existing locale settings and set options I always want.
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" ]
then
. "$XDG_CONFIG_HOME/locale.conf"

View file

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

View file

@ -1,20 +1,5 @@
#!/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" ]
then
emulate sh -c '. "$HOME/.profile"'
fi
unset _acp_ignore_shrc
if [ -r "$HOME/.zshrc" ]
then
. "$HOME/.zshrc"
fi

View file

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