mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Add completion for snapshot names for vagrant snapshot restore|delete
- Note that this does not cover additional options like --no-provision - It is also a bit slow, as `vagrant snapshot list` is used to gather the data
This commit is contained in:
parent
1294289d96
commit
52bf853cee
1 changed files with 9 additions and 0 deletions
|
|
@ -140,6 +140,15 @@ _vagrant() {
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
"snapshot")
|
||||
case "$prev" in
|
||||
"restore"|"delete")
|
||||
local snapshot_list=$(vagrant snapshot list)
|
||||
COMPREPLY=($(compgen -W "${snapshot_list}" -- ${cur}))
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in a new issue