aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-01 00:59:38 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-01 00:59:38 +1200
commit9b51be856c90584d9b59df4bd19ded55b2d9fc1d (patch)
tree3e30565d39c47fc0b430831a8b16471f1f7cda8c /bash/bashrc.d/prompt.bash
parentMore sensible use of local (diff)
downloaddotfiles-9b51be856c90584d9b59df4bd19ded55b2d9fc1d.tar.gz
dotfiles-9b51be856c90584d9b59df4bd19ded55b2d9fc1d.zip
Turns out older Bash is muddled by var=()
Initialisation with an array literal doesn't work in 2.05a
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index ea336d9a..aee3df66 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -63,7 +63,7 @@ prompt() {
branch=${branch##*/}
# Start collecting working copy state flags
- local state=()
+ local -a state
# If there are staged changes in the working tree, add a plus sign
# to the state
@@ -102,7 +102,7 @@ prompt() {
fi
# Start collecting working copy state flags
- local state=()
+ local -a state
# If there are changes in the tree, add an exclamation mark to the
# state
@@ -137,7 +137,7 @@ prompt() {
branch=${branch%%/*}
# Start collecting working copy state flags
- local state=()
+ local -a state
# If there are changes in the working directory, add an exclamation
# mark to the state