1
0
mirror of https://github.com/gryf/boxpy.git synced 2025-12-18 21:10:17 +01:00

Fixed bash completion for config; added default completion for all other options.

This commit is contained in:
2021-05-14 14:19:00 +02:00
parent 3b59622a68
commit d890f28eba

8
box.py
View File

@@ -133,8 +133,8 @@ _boxpy() {
fi
;;
create|rebuild)
items=(--cpus --disk-size --key --memory --hostname
--port --config --version)
items=(--cpus --disk-size --key --memory --hostname --port
--config --version)
if [[ ${prev} == ${cmd} ]]; then
if [[ ${cmd} = "rebuild" ]]; then
_vms_comp vms
@@ -148,10 +148,14 @@ _boxpy() {
case "${prev}" in
--config)
COMPREPLY=( $(compgen -f -- ${cur}) )
compopt -o plusdirs
;;
--key)
_ssh_identityfile
;;
--*)
COMPREPLY=( )
;;
esac
fi