contrib/bash/completion.sh: replaced -VAGRANTSLASH- with a literal slash in box names

This commit is contained in:
Andreas Grapentin 2018-07-04 13:55:05 +02:00
parent 04f7215b5e
commit 31766f8ba1
No known key found for this signature in database
GPG Key ID: 7171986E4B745536
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ _vagrant() {
then then
case "$prev" in case "$prev" in
"init") "init")
local box_list=$(find "${VAGRANT_HOME:-${HOME}/.vagrant.d}/boxes" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;) local box_list=$(find "${VAGRANT_HOME:-${HOME}/.vagrant.d}/boxes" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sed -e 's/-VAGRANTSLASH-/\//')
COMPREPLY=($(compgen -W "${box_list}" -- ${cur})) COMPREPLY=($(compgen -W "${box_list}" -- ${cur}))
return 0 return 0
;; ;;
@ -132,7 +132,7 @@ _vagrant() {
"box") "box")
case "$prev" in case "$prev" in
"remove"|"repackage") "remove"|"repackage")
local box_list=$(find "${VAGRANT_HOME:-${HOME}/.vagrant.d}/boxes" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;) local box_list=$(find "${VAGRANT_HOME:-${HOME}/.vagrant.d}/boxes" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sed -e 's/-VAGRANTSLASH-/\//')
COMPREPLY=($(compgen -W "${box_list}" -- ${cur})) COMPREPLY=($(compgen -W "${box_list}" -- ${cur}))
return 0 return 0
;; ;;