bin/sym.completion.bash in sym-2.8.2 vs bin/sym.completion.bash in sym-2.8.4

- old
+ new

@@ -12,17 +12,19 @@ [[ -n $BASH_VERSION && $0 != "$BASH_SOURCE" ]]) && _s_=1 || _s_=0 bash_version=$(bash --version | awk '{FS="version"}{print $4}') bash_version=${bash_version:0:1} -declare -a bash_completion_locations=(/usr/local/etc/bash_completion /usr/etc/bash_completion /etc/bash_completion) -loaded=false -for file in ${bash_completion_locations[@]}; do +[[ -z $(type _filedir 2>/dev/null) ]] && { + declare -a bash_completion_locations=(/usr/local/etc/bash_completion /usr/etc/bash_completion /etc/bash_completion) + loaded=false + for file in ${bash_completion_locations[@]}; do [[ -s ${file} ]] && { source ${file} break } -done + done +} _sym_long_opts() { sym -h | grep -- '--' | egrep '^ -' | awk '{print $2}' | sort }