diff --git a/gio/completion/gdbus b/gio/completion/gdbus index fea093271..6db3d70fa 100644 --- a/gio/completion/gdbus +++ b/gio/completion/gdbus @@ -21,7 +21,7 @@ __gdbus() { *:*) case "$COMP_WORDBREAKS" in *:*) - local colon_word=${cur%${cur##*:}} + local colon_word=${cur%"${cur##*:}"} local i=${#COMPREPLY[*]} while [ $((--i)) -ge 0 ]; do COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"} diff --git a/gio/completion/gio b/gio/completion/gio index 590dd53ee..4461dd419 100644 --- a/gio/completion/gio +++ b/gio/completion/gio @@ -47,7 +47,7 @@ __gio_location() { dir="$cur" elif [[ $cur =~ "/" ]]; then # Subtract basename because dirname cmd doesn't work well with schemes - dir=${cur%$(basename "$cur")} + dir=${cur%"$(basename "$cur")"} fi # List volumes and mounts