From cc5260bddc1e8146bb6330298caf871edf0d4d75 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sat, 5 Nov 2016 10:23:20 +0100 Subject: Simplify argument enumeration (again) --- .bashprompt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.bashprompt b/.bashprompt index 31624ee..af2890e 100644 --- a/.bashprompt +++ b/.bashprompt @@ -48,14 +48,11 @@ __fontify () output=$(__start-nonprinting) output+='\033[' - local attributes=($@) - - for ((i=0; i<$#; i++)) + for ((i=1; i<=$#; i++)) do - a=${attributes[${i}]} - output+=${codes[${a}]} + output+=${codes[${!i}]} - if ((i<$#-1)) + if ((i<$#)) then output+=';' else -- cgit v1.2.3