From 5b261a20e74da13921b79fe694ed7de2bc5989c9 Mon Sep 17 00:00:00 2001 From: Semen Martynov Date: Fri, 20 May 2016 20:05:00 +0300 Subject: [PATCH 1/6] This closes #34, boxes search will be made either on the default path, or the path defined in the VAGRANT_HOME variable. --- etc/bash_completion.d/vagrant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/bash_completion.d/vagrant b/etc/bash_completion.d/vagrant index 50a4bf1..53fd989 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 ;; @@ -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 ;; From 30e74a3f0f2aaa098ae4172ca027d49ed10f1927 Mon Sep 17 00:00:00 2001 From: Alex Wu Date: Mon, 16 Jan 2017 14:32:22 +0800 Subject: [PATCH 2/6] fix for cygwin and mingw in window environment --- etc/bash_completion.d/vagrant | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/bash_completion.d/vagrant b/etc/bash_completion.d/vagrant index 53fd989..00aad0e 100644 --- a/etc/bash_completion.d/vagrant +++ b/etc/bash_completion.d/vagrant @@ -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 From 1a5c30634a65047587194a1b7764d9623584167a Mon Sep 17 00:00:00 2001 From: Csaba Maulis Date: Tue, 7 Mar 2017 17:44:57 +0800 Subject: [PATCH 3/6] =?UTF-8?q?Add=20=E2=80=98prune=E2=80=99=20subcommand?= =?UTF-8?q?=20(vagrant=20box=20prune)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/bash_completion.d/vagrant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/bash_completion.d/vagrant b/etc/bash_completion.d/vagrant index 00aad0e..8142ee9 100644 --- a/etc/bash_completion.d/vagrant +++ b/etc/bash_completion.d/vagrant @@ -97,7 +97,7 @@ _vagrant() { return 0 ;; "box") - box_commands="add help list remove repackage" + box_commands="add help list remove prune repackage" COMPREPLY=($(compgen -W "${box_commands}" -- ${cur})) return 0 ;; From ae3f158f77d6d08825b9a4a323ea1635d70a20d3 Mon Sep 17 00:00:00 2001 From: "Curt J. Sampson" Date: Thu, 16 Mar 2017 16:08:30 +0900 Subject: [PATCH 4/6] Add `box update` command to completion --- etc/bash_completion.d/vagrant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/bash_completion.d/vagrant b/etc/bash_completion.d/vagrant index 8142ee9..253c5b4 100644 --- a/etc/bash_completion.d/vagrant +++ b/etc/bash_completion.d/vagrant @@ -97,7 +97,7 @@ _vagrant() { return 0 ;; "box") - box_commands="add help list remove prune repackage" + box_commands="add help list prune remove repackage update" COMPREPLY=($(compgen -W "${box_commands}" -- ${cur})) return 0 ;; From 12e9bc892292a6574fc28f27bfb11d979c8a6aee Mon Sep 17 00:00:00 2001 From: "Curt J. Sampson" Date: Wed, 22 Mar 2017 11:58:23 +0900 Subject: [PATCH 5/6] README: Update with information about the fork Commits up to this point bring in all open PRs from kura's repo (#35 and #38-40, fixing issues #34 and #37). This was done with fast-foward merges and cherry-picks to avoid cluttering the history with a pointless merge commit for every small change. I intend to continue this going forward. --- README.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 From 7c4704fa65698c43fecdca7e07be97ba02eefc75 Mon Sep 17 00:00:00 2001 From: "Curt J. Sampson" Date: Wed, 22 Mar 2017 12:18:11 +0900 Subject: [PATCH 6/6] CONTRIBUTING: Note we don't do merges and test only on GNU/Linux --- CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CONTRIBUTING.md 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.