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

Added bash completion for start/stop commands.

This commit is contained in:
2022-05-23 12:02:58 +02:00
parent 0fb0d64db6
commit 276ddd8681

12
box.py
View File

@@ -125,7 +125,7 @@ _boxpy() {
fi
fi
opts="create destroy rebuild info list completion ssh"
opts="create destroy rebuild info list completion ssh start stop"
if [[ ${cur} == "-q" || ${cur} == "-v" || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
@@ -193,6 +193,16 @@ _boxpy() {
_vms_comp runningvms
fi
;;
start)
if [[ ${prev} == ${cmd} ]]; then
_vms_comp vms
fi
;;
stop)
if [[ ${prev} == ${cmd} ]]; then
_vms_comp runningvms
fi
;;
esac
}