FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bash-it/plugins/available/vagrant.plugin.bash at master · gitanicsoftware/bash-it · GitHub
gitanicsoftware
bash-it
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
bash-it
/
plugins
/
available
/
vagrant.plugin.bash
Copy path
More file actions
More file actions
Latest commit
History
History
History
52 lines (46 loc) · 1.24 KB
Breadcrumbs
bash-it
/
plugins
/
available
/
vagrant.plugin.bash
Copy path
File metadata and controls
52 lines (46 loc) · 1.24 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cite about-plugin
about-plugin
'
set up vagrant autocompletion
'
_vagrant
()
{
cur=
"
${COMP_WORDS[COMP_CWORD]}
"
prev=
"
${COMP_WORDS[COMP_CWORD-1]}
"
commands=
"
box destroy halt help init package provision reload resume ssh ssh_config status suspend up version
"
if
[
$COMP_CWORD
==
1 ]
then
COMPREPLY=(
$(
compgen -W
"
${commands}
"
--
${cur}
)
)
return
0
fi
if
[
$COMP_CWORD
==
2 ]
then
case
"
$prev
"
in
"
box
"
)
box_commands=
"
add help list remove repackage
"
COMPREPLY=(
$(
compgen -W
"
${box_commands}
"
--
${cur}
)
)
return
0
;;
"
help
"
)
COMPREPLY=(
$(
compgen -W
"
${commands}
"
--
${cur}
)
)
return
0
;;
*
)
;;
esac
fi
if
[
$COMP_CWORD
==
3 ]
then
action=
"
${COMP_WORDS[COMP_CWORD-2]}
"
if
[
$action
==
'
box
'
]
then
case
"
$prev
"
in
"
remove
"
|
"
repackage
"
)
local
box_list=
$(
find
$HOME
/.vagrant/boxes/
*
-maxdepth 0 -type d -printf
'
%f
'
)
COMPREPLY=(
$(
compgen -W
"
${box_list}
"
--
${cur}
)
)
return
0
;;
*
)
;;
esac
fi
fi
}
complete
-F _vagrant vagrant
Back
|
FazBrowse Home
|
New Git URL