1
0
mirror of https://github.com/gryf/boxpy.git synced 2025-12-20 14:17:57 +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 fi
;; ;;
create|rebuild) create|rebuild)
items=(--cpus --disk-size --key --memory --hostname items=(--cpus --disk-size --key --memory --hostname --port
--port --config --version) --config --version)
if [[ ${prev} == ${cmd} ]]; then if [[ ${prev} == ${cmd} ]]; then
if [[ ${cmd} = "rebuild" ]]; then if [[ ${cmd} = "rebuild" ]]; then
_vms_comp vms _vms_comp vms
@@ -148,10 +148,14 @@ _boxpy() {
case "${prev}" in case "${prev}" in
--config) --config)
COMPREPLY=( $(compgen -f -- ${cur}) ) COMPREPLY=( $(compgen -f -- ${cur}) )
compopt -o plusdirs
;; ;;
--key) --key)
_ssh_identityfile _ssh_identityfile
;; ;;
--*)
COMPREPLY=( )
;;
esac esac
fi fi