aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/cd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-08-18 01:44:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-08-18 01:44:36 +1200
commite8911b20d610acd0403995f832c02900b1ea061e (patch)
treef399a5bfbda989b389a8e910faf44045b36fdea2 /bash/bashrc.d/cd.bash
parentRemove extraneous quoting (diff)
downloaddotfiles-e8911b20d610acd0403995f832c02900b1ea061e.tar.gz
dotfiles-e8911b20d610acd0403995f832c02900b1ea061e.zip
Use arithmetic expansion for argument count test
Diffstat (limited to 'bash/bashrc.d/cd.bash')
-rw-r--r--bash/bashrc.d/cd.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash
index 860b65b5..186ddceb 100644
--- a/bash/bashrc.d/cd.bash
+++ b/bash/bashrc.d/cd.bash
@@ -6,7 +6,7 @@ __cd() {
opts[${#opts[@]}]="-$opt"
done
shift $(($OPTIND-1))
- if [[ $# -eq 2 ]]; then
+ if (($# == 2)); then
if [[ "$PWD" == *"$1"* ]]; then
builtin cd "${opts[@]}" "${PWD/$1/$2}"
else