Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Add box update command to completion #40

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 10 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 12 additions & 4 deletions etc/bash_completion.d/vagrant
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand All @@ -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
;;
Expand Down Expand Up @@ -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
;;
Expand All @@ -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