Remove verbose options from `_upvars'.
This commit is contained in:
parent
a8dd58cfa9
commit
0118ccb05a
@ -227,6 +227,7 @@ _upvar() {
|
|||||||
# -aN Assign next N values to varname as array
|
# -aN Assign next N values to varname as array
|
||||||
# -v Assign single value to varname
|
# -v Assign single value to varname
|
||||||
# Return: 1 if error occurs
|
# Return: 1 if error occurs
|
||||||
|
# See: http://fvue.nl/wiki/Bash:_Passing_variables_by_reference
|
||||||
_upvars() {
|
_upvars() {
|
||||||
if ! (( $# )); then
|
if ! (( $# )); then
|
||||||
echo "${FUNCNAME[0]}: usage: ${FUNCNAME[0]} [-v varname"\
|
echo "${FUNCNAME[0]}: usage: ${FUNCNAME[0]} [-v varname"\
|
||||||
@ -253,22 +254,6 @@ _upvars() {
|
|||||||
shift 3 || { echo "bash: ${FUNCNAME[0]}: $1: missing"\
|
shift 3 || { echo "bash: ${FUNCNAME[0]}: $1: missing"\
|
||||||
"argument(s)" 1>&2; return 1; }
|
"argument(s)" 1>&2; return 1; }
|
||||||
;;
|
;;
|
||||||
--help) echo "\
|
|
||||||
Usage: local varname [varname ...] &&
|
|
||||||
${FUNCNAME[0]} [-v varname value] | [-aN varname [value ...]] ...
|
|
||||||
Available OPTIONS:
|
|
||||||
-aN VARNAME [value ...] assign next N values to varname as array
|
|
||||||
-v VARNAME value assign single value to varname
|
|
||||||
--help display this help and exit
|
|
||||||
--version output version information and exit"
|
|
||||||
return 0 ;;
|
|
||||||
--version) echo "\
|
|
||||||
${FUNCNAME[0]}-0.9.dev
|
|
||||||
Copyright (C) 2010 Freddy Vulto
|
|
||||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
|
||||||
This is free software: you are free to change and redistribute it.
|
|
||||||
There is NO WARRANTY, to the extent permitted by law."
|
|
||||||
return 0 ;;
|
|
||||||
*)
|
*)
|
||||||
echo "bash: ${FUNCNAME[0]}: $1: invalid option" 1>&2
|
echo "bash: ${FUNCNAME[0]}: $1: invalid option" 1>&2
|
||||||
return 1 ;;
|
return 1 ;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user