diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2016-11-05 10:23:20 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2016-11-05 10:25:09 +0100 |
| commit | cc5260bddc1e8146bb6330298caf871edf0d4d75 (patch) | |
| tree | ad132eb912dcbdeb89a40b6241b21cfa35b38647 /.bashprompt | |
| parent | 841b71492a9fdf3a7a4bb5c4c11673a62038174b (diff) | |
| download | dotfiles-cc5260bddc1e8146bb6330298caf871edf0d4d75.tar.xz | |
Simplify argument enumeration (again)
Diffstat (limited to '.bashprompt')
| -rw-r--r-- | .bashprompt | 9 |
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 |
