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
|
@ -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 New Issue