diff --git a/contrib/completion/bash-completion.sh b/contrib/completion/bash-completion.sh index 3858baec..ed4b3a9a 100755 --- a/contrib/completion/bash-completion.sh +++ b/contrib/completion/bash-completion.sh @@ -61,10 +61,15 @@ function _resticprofile() { ;; esac fi + + if [[ ! "${COMPREPLY[*]}" == *. ]]; then + # Add space if the last character is not a '.' + compopt +o nospace + fi } # Registering the completion -complete -F _resticprofile resticprofile +complete -F _resticprofile -o nospace resticprofile # # __resticprofile_get_other_completions