diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8de0bfe --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +Contributing to vagrant-bash-completion +======================================= + +To make the history easier to read and understand, this repo no longer +does merge commits. Please ensure that when you submit a PR it's been +rebased on to the latest commit on the `master` branch. + +The maintainer currently tests only on GNU/Linux. In the PR you should +note how you tested your change, particularly if it's for a platform +other than that. diff --git a/README.rst b/README.rst index c24bc52..7aa509f 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,14 @@ -Getting stuff merged -==================== +The Fork +======== -If you have a pull request you want merged, shout at me -on Twitter [at]kuramanga or via email kura[at]kura[dot]io +This has been forked from [kura's repo][kura-vbc]. At the time of this +commit that repo had [four open PRs][kura-pr] the oldest of which was +a year old. I tried to contact him by e-mail but his domain +(`kura.io`) has expired. Thus, I've forked this, brought in all open +PRs and will be merging any further PRs offered to this repo. + +[kura-vbc]: https://github.com/kura/vagrant-bash-completion +[kura-pr]: https://github.com/kura/vagrant-bash-completion/pulls Installation diff --git a/etc/bash_completion.d/vagrant b/etc/bash_completion.d/vagrant index 50a4bf1..253c5b4 100644 --- a/etc/bash_completion.d/vagrant +++ b/etc/bash_completion.d/vagrant @@ -71,7 +71,7 @@ _vagrant() { then case "$prev" in "init") - local box_list=$(find $HOME/.vagrant.d/boxes -mindepth 1 -maxdepth 1 -type d -exec basename {} \;|sed -e 's/-VAGRANTSLASH-/\//') + 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})) return 0 ;; @@ -97,7 +97,7 @@ _vagrant() { return 0 ;; "box") - box_commands="add help list remove repackage" + box_commands="add help list prune remove repackage update" COMPREPLY=($(compgen -W "${box_commands}" -- ${cur})) return 0 ;; @@ -133,7 +133,7 @@ _vagrant() { "box") case "$prev" in "remove"|"repackage") - local box_list=$(find $HOME/.vagrant.d/boxes -mindepth 1 -maxdepth 1 -type d -exec basename {} \;|sed -e 's/-VAGRANTSLASH-/\//') + 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})) return 0 ;; @@ -150,4 +150,12 @@ _vagrant() { esac fi } -complete -F _vagrant vagrant + +case $( uname -s | tr '[:upper:]' '[:lower:]' ) in + cygwin*|mingw*) + complete -F _vagrant vagrant.exe + ;; + *) + complete -F _vagrant vagrant + ;; +esac