[bash] fix shellcheck error SC1073

The way I was doing the test is incorrect, as [ is the test(1) program
and the shell builtin command is not something it understands. Instead,
I now just let the shell execute `command` and then set the variable if
`brew` is available.
This commit is contained in:
Fernando Schauenburg 2020-12-03 18:33:45 +01:00
parent 220f9a7122
commit cf0a08baaf

View file

@ -21,7 +21,7 @@ export LESS="-i -j.49 -M -R -z-2"
export LESSHISTFILE="$XDG_CACHE_HOME/less/history"
export LESSHISTSIZE=1000
export LOCAL_PREFIX="/usr/local"
[ command -v brew &>/dev/null ] && LOCAL_PREFIX=$(brew --prefix)
command -v brew &>/dev/null && LOCAL_PREFIX="$(brew --prefix)"
export MANPATH="$(MANPATH='' manpath)"
export PAGER=less
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py"