From 39653507bb9f83ed6081eff4650adfa63a088666 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 5 Aug 2015 14:40:19 +1200 Subject: Move var declaration closer to usage --- bash/bashrc.d/pd.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bash') 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=.. -- cgit v1.2.3