commit e751f68f20d14561584e8c649358dc55036fce20
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2014-12-24T10:12:39Z |
| subject | Bug fix due to previous commit changes |
commit e751f68f20d14561584e8c649358dc55036fce20
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2014-12-24T10:12:39Z
Bug fix due to previous commit changes
---
bash/bashrc/sources/40_go-command | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/bash/bashrc/sources/40_go-command b/bash/bashrc/sources/40_go-command
index f64167f..15346b7 100755
--- a/bash/bashrc/sources/40_go-command
+++ b/bash/bashrc/sources/40_go-command
@@ -95,17 +95,19 @@ __go_nav() {
LISTOF=''
for i in "${!PWDA[@]}"
do
- MARK=$i
- if [[ "${PWDA[$i]}" =~ $ARG3 ]]; then
+ STACK=${PWDA[$i]}
+ if [ -z "$STACK" ]; then
continue
fi
- if [[ "${PWDA[$i]}" =~ $ARG3 ]]; then
+ MARK=$i
+
+ if [ -n "$ARG3" ] && [[ "$STACK" =~ "$ARG3" ]]; then
break
fi
- if [[ -n "${PWDA[$i]}" ]]; then
- LISTOF="$LISTOF\n ${PWDA[$i]}";
+ if [[ -n "$STACK" ]]; then
+ LISTOF="$LISTOF\n $STACK";
fi
done