From af5ae490f8e7ea77e114d6542a4170aa36a58391 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 16 Jan 2020 18:49:42 +0100 Subject: Adding verbose option for container start command. Signed-off-by: Daniel Baumann --- lib/container/start | 8 ++++++-- share/bash-completion/container | 2 +- share/man/container-start.1.txt | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/container/start b/lib/container/start index 13fc6ef..4accd82 100755 --- a/lib/container/start +++ b/lib/container/start @@ -34,8 +34,8 @@ Parameters () { OPTIONS_ALL="" - GETOPT_LONGOPTIONS="name:,force,nspawn,start," - GETOPT_OPTIONS="n:f," + GETOPT_LONGOPTIONS="name:,force,nspawn,start,verbose," + GETOPT_OPTIONS="n:,f,v," PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})" @@ -75,6 +75,10 @@ Parameters () shift 1 ;; + -v|--verbose) + VERBOSE="true" + ;; + --) shift 1 break diff --git a/share/bash-completion/container b/share/bash-completion/container index d791ff6..1e3523f 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -236,7 +236,7 @@ _container() ;; *) - opts="-n --name" + opts="-n --name -v --verbose" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt index 90750c0..14ef8ab 100644 --- a/share/man/container-start.1.txt +++ b/share/man/container-start.1.txt @@ -49,6 +49,9 @@ The following container options are available: *-f, --force'*:: Removing stray lock file if existing. +*-v, --verbose*:: + Explain what is being done. + EXAMPLES -------- -- cgit v1.2.3