summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2016-11-05 10:23:20 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2016-11-05 10:25:09 +0100
commitcc5260bddc1e8146bb6330298caf871edf0d4d75 (patch)
treead132eb912dcbdeb89a40b6241b21cfa35b38647
parent841b71492a9fdf3a7a4bb5c4c11673a62038174b (diff)
downloaddotfiles-cc5260bddc1e8146bb6330298caf871edf0d4d75.tar.xz
Simplify argument enumeration (again)
-rw-r--r--.bashprompt9
1 files 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