Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Feb 2016 00:28:49 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295587 - head/share/examples/jails
Message-ID:  <201602130028.u1D0SnXE094642@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Sat Feb 13 00:28:48 2016
New Revision: 295587
URL: https://svnweb.freebsd.org/changeset/base/295587

Log:
  Fix missing description for command usage
  
  While "jng" or "jib" without arguments told you what each sub-command does,
  sub-command usage didn't tell you (e.g., "jng bridge" or "jib addm" gave
  only usage and not description).

Modified:
  head/share/examples/jails/jib
  head/share/examples/jails/jng

Modified: head/share/examples/jails/jib
==============================================================================
--- head/share/examples/jails/jib	Fri Feb 12 22:46:14 2016	(r295586)
+++ head/share/examples/jails/jib	Sat Feb 13 00:28:48 2016	(r295587)
@@ -164,9 +164,11 @@ usage()
 
 action_usage()
 {
-	local usage action="$1"
+	local usage descr action="$1"
 	eval usage=\"\$jib_${action}_usage\"
 	echo "Usage: $pgm $usage" >&2
+	eval descr=\"\$jib_${action}_descr\"
+	printf "\t%s\n" "$descr"
 	exit $FAILURE
 }
 

Modified: head/share/examples/jails/jng
==============================================================================
--- head/share/examples/jails/jng	Fri Feb 12 22:46:14 2016	(r295586)
+++ head/share/examples/jails/jng	Sat Feb 13 00:28:48 2016	(r295587)
@@ -166,9 +166,11 @@ usage()
 
 action_usage()
 {
-	local usage action="$1"
+	local usage descr action="$1"
 	eval usage=\"\$jng_${action}_usage\"
 	echo "Usage: $pgm $usage" >&2
+	eval descr=\"\$jng_${action}_descr\"
+	printf "\t%s\n" "$descr"
 	exit $FAILURE
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602130028.u1D0SnXE094642>