diff --git a/roles/bash/files/profile b/roles/bash/files/profile index 24b80c8..8f802e3 100644 --- a/roles/bash/files/profile +++ b/roles/bash/files/profile @@ -40,7 +40,7 @@ export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' [ "$(uname)" == "Darwin" ] && { PATH=""; source /etc/profile; } 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 list=${list#"$1:"} # remove dir from beginning list=${list//":$1:"/:} # remove dir from middle