aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/cd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-02-19 10:55:21 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-02-19 10:55:21 +1300
commitab4565974746d2d370e84468961fe125daf6a724 (patch)
tree8b673ecb07fefe16d13049c54a413b146c9fd7b2 /bash/bashrc.d/cd.bash
parentAvoid ambiguous conditional syntax (diff)
downloaddotfiles-ab4565974746d2d370e84468961fe125daf6a724.tar.gz
dotfiles-ab4565974746d2d370e84468961fe125daf6a724.zip
Don't break up short lines
Diffstat (limited to 'bash/bashrc.d/cd.bash')
-rw-r--r--bash/bashrc.d/cd.bash3
1 files changed, 1 insertions, 2 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash
index 26cffae0..16dbfc48 100644
--- a/bash/bashrc.d/cd.bash
+++ b/bash/bashrc.d/cd.bash
@@ -14,8 +14,7 @@ cd() {
done
if ((${#dirs[@]} == 2)) ; then
if [[ $PWD == *"${dirs[0]}"* ]] ; then
- builtin cd "${opts[@]}" \
- -- "${PWD/${dirs[0]}/${dirs[1]}}"
+ builtin cd "${opts[@]}" -- "${PWD/${dirs[0]}/${dirs[1]}}"
else
printf '%s\n' 'bash: cd: could not replace substring' >&2
return 1