[bash] fix shellcheck error SC2166
For details, see: https://github.com/koalaman/shellcheck/wiki/SC2166
This commit is contained in:
parent
93cea206a6
commit
eef6e7d58f
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
|
||||||
[ "$(uname)" == "Darwin" ] && { PATH=""; source /etc/profile; }
|
[ "$(uname)" == "Darwin" ] && { PATH=""; source /etc/profile; }
|
||||||
|
|
||||||
prepend_dir() { # 1: dir to add, 2: variable to manipulate
|
prepend_dir() { # 1: dir to add, 2: variable to manipulate
|
||||||
[ -d "$1" -a -n "$2" ] || return
|
[ -d "$1" ] && [ -n "$2" ] || return
|
||||||
local list="${!2}" # capture current value
|
local list="${!2}" # capture current value
|
||||||
list=${list#"$1:"} # remove dir from beginning
|
list=${list#"$1:"} # remove dir from beginning
|
||||||
list=${list//":$1:"/:} # remove dir from middle
|
list=${list//":$1:"/:} # remove dir from middle
|
||||||
|
|
Loading…
Add table
Reference in a new issue