mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
lib/omb-deprecate: Fix "_omb_deprecate_declare" outputting varname
Reported-By: Matt Faucher (@mattfaucher on GitHub)
1dfbd39fd6 (commitcomment-130420417)
This commit is contained in:
@ -68,7 +68,7 @@ function _omb_deprecate_declare__init {
|
|||||||
fi >/dev/tty
|
fi >/dev/tty
|
||||||
fi
|
fi
|
||||||
if [[ $__new && ! ${!__new+set} ]]; then
|
if [[ $__new && ! ${!__new+set} ]]; then
|
||||||
printf "$__new" '%s' "${!__old}"
|
printf -v "$__new" '%s' "${!__old}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ else
|
|||||||
__notify=1
|
__notify=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "$__old" %s "${!__new-}"
|
printf -v "$__old" %s "${!__new-}"
|
||||||
if [[ :$__opts: == *:track:* ]]; then
|
if [[ :$__opts: == *:track:* ]]; then
|
||||||
local __index=${#_omb_deprecate_declare[@]}
|
local __index=${#_omb_deprecate_declare[@]}
|
||||||
_omb_deprecate_declare[__index]=track:$__old:$__new:$__msg
|
_omb_deprecate_declare[__index]=track:$__old:$__new:$__msg
|
||||||
|
Reference in New Issue
Block a user