diff --git a/qvm-tools/qvm-console-dispvm b/qvm-tools/qvm-console-dispvm index 21b1bce9b..73a0f79da 100755 --- a/qvm-tools/qvm-console-dispvm +++ b/qvm-tools/qvm-console-dispvm @@ -2,12 +2,20 @@ set -eu print_usage() { cat >&2 << USAGE -Usage: $0 [--autostart] [--] vmname +Usage: $0 [--help] [--autostart] [--] vmname + Connects to VM console throught DispVM using the qubes.ShowInTerminal RPC service. -With --autostart, start the VM first. + + --help, -h show this help message and exit + --autostart start the VM first. USAGE } +if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then + print_usage + exit 0 +fi + do_start=false if [[ $# -ge 2 ]] && [[ "$1" = '--autostart' ]]; then do_start=: