Bug fix due to previous commit changes

This commit is contained in:
斟酌 鵬兄 2014-12-24 18:12:39 +08:00
parent 96e7746dbd
commit e751f68f20

View File

@ -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