aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-02-19 10:36:12 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-02-19 10:36:12 +1300
commit49ec7982503778913b3bee69ab40942d1e7bb7b5 (patch)
treeaf7b014921223e84fa265e8380873b261a6719af
parentSimplify/clarify history settings (diff)
downloaddotfiles-49ec7982503778913b3bee69ab40942d1e7bb7b5.tar.gz
dotfiles-49ec7982503778913b3bee69ab40942d1e7bb7b5.zip
Remove unneeded ${...} wraps around array derefs
Arrays can be dereferenced in arithmetic context, which I didn't realise until I actually tried it. This looks neater.
-rw-r--r--bash/bashrc2
-rw-r--r--bash/bashrc.d/pass.bash2
-rw-r--r--bash/bashrc.d/prompt.bash2
3 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc b/bash/bashrc
index defda393..3aa963d4 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -64,7 +64,7 @@ shopt -s shift_verbose
shopt -u sourcepath
# These options only exist since Bash 4.0-alpha
-if ((${BASH_VERSINFO[0]} >= 4)) ; then
+if ((BASH_VERSINFO[0] >= 4)) ; then
# Warn me about stopped jobs when exiting
shopt -s checkjobs
# Autocorrect fudged paths during completion
diff --git a/bash/bashrc.d/pass.bash b/bash/bashrc.d/pass.bash
index 6c403d1c..a03b0887 100644
--- a/bash/bashrc.d/pass.bash
+++ b/bash/bashrc.d/pass.bash
@@ -47,7 +47,7 @@ _pass()
}
# Completion only has -o nospace in Bash >=3.0
-if ((${BASH_VERSINFO[0]} >= 3)) ; then
+if ((BASH_VERSINFO[0] >= 3)) ; then
complete -o filenames -o nospace -F _pass pass
else
complete -o filenames -F _pass pass
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index c9b7f613..ed161306 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -11,7 +11,7 @@ prompt() {
PS1='[\u@\h:\w]$(prompt vcs)$(prompt job)$(prompt ret)\$'
# If Bash 4.0 is available, trim very long paths in prompt
- if ((${BASH_VERSINFO[0]} >= 4)) ; then
+ if ((BASH_VERSINFO[0] >= 4)) ; then
PROMPT_DIRTRIM=4
fi