@@ -81,7 +81,7 @@ __bundle() {
8181 ;;
8282 config)
8383 case $prev in
84- config | --* )
84+ config | get | set | unset | --* )
8585 case $cur in
8686 local.* )
8787 options=($( __bundle_exec_ruby ' puts Bundler.definition.specs.to_hash.keys' ) )
@@ -100,17 +100,19 @@ __bundle() {
100100 no_install no_prune only_update_to_newer_versions
101101 plugins shebang silence_root_warning
102102 ssl_verify_mode system_bindir user_agent)
103+ if [[ $prev = config ]]; then
104+ options+=(get set unset)
105+ fi
103106 # We want to suggest the options above as complete words,
104107 # and also "local." and "mirror." as prefixes
105108 # To achieve that, disable automatic space insertion,
106109 # insert it manually, then add the non-spaced prefixes
107110 compopt -o nospace 2> /dev/null
108- options=(" ${options[@]/%/ } " )
109- # And add prefix suggestions
110- options+=(local. mirror.)
111- # Override $IFS for completion to work
112111 local IFS=$' \n '
113- COMPREPLY=($( compgen -W ' ${options[@]}' -- " $cur " ) )
112+ COMPREPLY=($( compgen -W " ${options[*]} " -S ' ' -- " $cur " ) )
113+ # And add prefix suggestions
114+ options=(local. mirror.)
115+ COMPREPLY+=($( compgen -W " ${options[*]} " -- " $cur " ) )
114116 return
115117 ;;
116118 esac
0 commit comments