aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/cd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-08-20 11:30:40 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-08-20 11:30:40 +1200
commitc549fd2782547ebf37e0b7c08b70dba76b1a5eef (patch)
tree855535dba3539cb0d6ac9143af69dab3827cabd2 /bash/bashrc.d/cd.bash
parentUse arithmetic expression for argument count (diff)
downloaddotfiles-c549fd2782547ebf37e0b7c08b70dba76b1a5eef.tar.gz
dotfiles-c549fd2782547ebf37e0b7c08b70dba76b1a5eef.zip
Remove unneeded quoting within [[ ]]
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 1813a9da..282e1649 100644
--- a/bash/bashrc.d/cd.bash
+++ b/bash/bashrc.d/cd.bash
@@ -7,7 +7,7 @@ __cd() {
done
shift $(($OPTIND-1))
if (($# == 2)); then
- if [[ "$PWD" == *"$1"* ]]; then
+ if [[ $PWD == *$1* ]]; then
builtin cd "${opts[@]}" "${PWD/$1/$2}"
else
printf "bash: cd: could not replace substring\n" >&2