aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-08-05 14:40:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-08-05 14:40:19 +1200
commit39653507bb9f83ed6081eff4650adfa63a088666 (patch)
tree723dbf4f23a5b96f82652fb28544e2f2f12263e9 /bash
parentPass bd options to cd (diff)
downloaddotfiles-39653507bb9f83ed6081eff4650adfa63a088666.tar.gz
dotfiles-39653507bb9f83ed6081eff4650adfa63a088666.zip
Move var declaration closer to usage
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/pd.bash3
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/bashrc.d/pd.bash b/bash/bashrc.d/pd.bash
index 8003c966..db0ba799 100644
--- a/bash/bashrc.d/pd.bash
+++ b/bash/bashrc.d/pd.bash
@@ -4,7 +4,7 @@
# containing directory. In the absence of an argument, this just shifts up a
# directory, i.e. `cd ..`
pd() {
- local arg target
+ local arg
local -a opts
for arg ; do
case $arg in
@@ -21,6 +21,7 @@ pd() {
;;
esac
done
+ local target
case $# in
0)
target=..