aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/cd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-08-05 23:50:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-08-05 23:50:47 +1200
commit31793483b1cf33fc4df6bdd168be393a9ad34da6 (patch)
tree8023026f55247b4982479809c3c46dfbb5a2ef84 /bash/bashrc.d/cd.bash
parentInitialise cd options to empty string (diff)
downloaddotfiles-31793483b1cf33fc4df6bdd168be393a9ad34da6.tar.gz
dotfiles-31793483b1cf33fc4df6bdd168be393a9ad34da6.zip
Inline while loop in cd function with do
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 256acadd..3ee3329f 100644
--- a/bash/bashrc.d/cd.bash
+++ b/bash/bashrc.d/cd.bash
@@ -2,8 +2,7 @@
# emulating a Zsh function that I often find useful; preserves options too
__cd() {
local opts=
- while getopts lPe opt
- do
+ while getopts lPe opt; do
opts="$opts -$opt"
done
shift $(($OPTIND-1))