env: fix shellcheck errors and warnings

This commit is contained in:
Fernando Schauenburg 2022-09-28 13:12:44 +02:00
parent 210978ab8f
commit 8cb0e94698

View file

@ -25,13 +25,15 @@ export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
# a pty $TERM is not set). # a pty $TERM is not set).
[ -n "$TERM" ] && { [ -n "$TERM" ] && {
rst="$(tput sgr0)" rst="$(tput sgr0)"
export LESS_TERMCAP_md="$(printf '%s\n' 'setaf 3' | tput -S)" LESS_TERMCAP_md="$(printf '%s\n' 'setaf 3' | tput -S)"
export LESS_TERMCAP_mb="$LESS_TERMCAP_md" LESS_TERMCAP_mb="$LESS_TERMCAP_md"
export LESS_TERMCAP_me="$rst" LESS_TERMCAP_me="$rst"
export LESS_TERMCAP_us="$(printf '%s\n' 'setaf 7' 'smul' | tput -S)" LESS_TERMCAP_us="$(printf '%s\n' 'setaf 7' 'smul' | tput -S)"
export LESS_TERMCAP_ue="$rst" LESS_TERMCAP_ue="$rst"
export LESS_TERMCAP_so="$(printf '%s\n' 'setaf 4' 'setab 0' | tput -S)" LESS_TERMCAP_so="$(printf '%s\n' 'setaf 4' 'setab 0' | tput -S)"
export LESS_TERMCAP_se="$rst" LESS_TERMCAP_se="$rst"
export LESS_TERMCAP_md LESS_TERMCAP_mb LESS_TERMCAP_me
export LESS_TERMCAP_us LESS_TERMCAP_ue LESS_TERMCAP_so LESS_TERMCAP_se
export GROFF_NO_SGR=1 export GROFF_NO_SGR=1
unset rst unset rst
} }
@ -46,7 +48,8 @@ export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
# which would undo what we do here. # which would undo what we do here.
# $ZDOTDIR/.zshrc <-- So we defer our PATH manipulation to this file. # $ZDOTDIR/.zshrc <-- So we defer our PATH manipulation to this file.
# #
[ "$(uname -s)" = "Darwin" ] || source "$XDG_CONFIG_HOME/shell/path.sh" # shellcheck disable=SC1090
[ "$(uname -s)" = "Darwin" ] || . "$XDG_CONFIG_HOME/shell/path.sh"
# Set $DISPLAY if running in WSL and an Xserver is reachable # Set $DISPLAY if running in WSL and an Xserver is reachable
# #