mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-22 18:18:59 +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
|
||||
function _msg() {
|
||||
local msg="$2"
|
||||
local i
|
||||
command -v gettext 1>/dev/null 2>/dev/null && msg="$(gettext -s "$2")"
|
||||
for i in $(seq 3 ${#});
|
||||
do
|
||||
for i in {3..${#}}; do
|
||||
msg=${(S)msg//::$(($i - 2))*::/$*[$i]}
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user