Make shellcheck fixes
This commit is contained in:
parent
1edcc573a7
commit
5e5b1f4b2a
12
bash/.bashrc
12
bash/.bashrc
|
@ -47,11 +47,13 @@ export LESS_TERMCAP_ue=""
|
||||||
export LESS_TERMCAP_us="[4m"
|
export LESS_TERMCAP_us="[4m"
|
||||||
|
|
||||||
# Enable dircolors
|
# Enable dircolors
|
||||||
if test -x "$(command -v dircolors)"; then
|
if [[ -x "$(command -v dircolors)" ]]; then
|
||||||
test -r ~/.config/shell/dircolors &&
|
if [[ -r ~/.config/shell/dircolors ]]; then
|
||||||
eval "$(dircolors -b ~/.config/shell/dircolors)" ||
|
eval "$(dircolors -b ~/.config/shell/dircolors)"
|
||||||
|
else
|
||||||
eval "$(dircolors -b)"
|
eval "$(dircolors -b)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Safety features
|
# Safety features
|
||||||
set -o noclobber # Enable features to prevent accidental file deletion
|
set -o noclobber # Enable features to prevent accidental file deletion
|
||||||
|
@ -67,11 +69,11 @@ source ~/.config/shell/aliasrc
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
md() {
|
md() {
|
||||||
mkdir -p "$1" && cd "$1"
|
mkdir -p "$1" && cd "$1" || return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Automatically run tmux if we aren't already in a session and there's no matching session already running
|
# Automatically run tmux if we aren't already in a session and there's no matching session already running
|
||||||
if [[ -z "$TMUX" && -z "$(tmux list-sessions | grep $HOSTNAME)" ]]; then
|
if [[ -z "$TMUX" ]] && ! tmux list-sessions | grep --quiet "$HOSTNAME"; then
|
||||||
tmux new -s "$HOSTNAME"
|
tmux new -s "$HOSTNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue