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:
12
box.py
12
box.py
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user