mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-23 02:28:58 +00:00
fix bug in message rendering: stop overriding $i if existing
this small bug caused rewriting the $i variable (often used as iterator in loops) whenever a log message was produced. Fix also includes an acceleration of log printing by substituting seq with native zsh notation.
This commit is contained in:
parent
6696f0c758
commit
6182a56fb6
4
tomb
4
tomb
@ -701,9 +701,9 @@ option_value() {
|
|||||||
# Messaging function with pretty coloring
|
# Messaging function with pretty coloring
|
||||||
function _msg() {
|
function _msg() {
|
||||||
local msg="$2"
|
local msg="$2"
|
||||||
|
local i
|
||||||
command -v gettext 1>/dev/null 2>/dev/null && msg="$(gettext -s "$2")"
|
command -v gettext 1>/dev/null 2>/dev/null && msg="$(gettext -s "$2")"
|
||||||
for i in $(seq 3 ${#});
|
for i in {3..${#}}; do
|
||||||
do
|
|
||||||
msg=${(S)msg//::$(($i - 2))*::/$*[$i]}
|
msg=${(S)msg//::$(($i - 2))*::/$*[$i]}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user