commit 583562b9e56207bd428497ceb96df4e1f1f53158
Author: Ville Skyttä <ville.skytta@iki.fi>
Date:   Sun May 6 21:41:48 2018 +0200

    __load_completion: Avoid bad array subscript on "commands" ending with slash
    
    Closes #209

diff --git a/bash_completion b/bash_completion
index 9a9eae0b..442c0757 100644
--- a/bash_completion
+++ b/bash_completion
@@ -2019,6 +2019,7 @@ __load_completion()
 {
     local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
     local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile
+    [[ -n $cmd ]] || return 1
     for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
         dirs+=( $dir/bash-completion/completions )
     done
