hide shellcheck warnings

main
Andrew Coleman 2021-05-11 12:28:44 -04:00
parent 90b4fd8a73
commit d12ded88f4
1 changed files with 5 additions and 1 deletions

View File

@ -1,11 +1,14 @@
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
# shellcheck disable=SC2164
if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi
# shellcheck disable=SC2164
if [ -d "/usr$HOME" ] ; then export HOME=/usr$HOME ; cd ; fi if [ -d "/usr$HOME" ] ; then export HOME=/usr$HOME ; cd ; fi
for BASHRC in /etc/bashrc /etc/bash.bashrc /etc/bash/bashrc ; do for BASHRC in /etc/bashrc /etc/bash.bashrc /etc/bash/bashrc ; do
if [ -f "$BASHRC" ] ; then if [ -f "$BASHRC" ] ; then
# shellcheck source=/dev/null
. "$BASHRC" . "$BASHRC"
fi fi
done done
@ -13,7 +16,7 @@ unset BASHRC
EDITOR=nvim; export EDITOR EDITOR=nvim; export EDITOR
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] if ! [[ "$PATH" =~ $HOME/.local/bin:$HOME/bin: ]]
then then
PATH="$HOME/.local/bin:$HOME/bin:$PATH" PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi fi
@ -23,6 +26,7 @@ export PATH
if [ -d ~/.bashrc.d ]; then if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then if [ -f "$rc" ]; then
# shellcheck source=/dev/null
. "$rc" . "$rc"
fi fi
done done