penguin/utils

my env utils

commit 27aee4d5c96041b47e28081b23a586757983a7a5

author斟酌 鵬兄 <tgckpg@gmail.com>
date2014-12-21T12:30:42Z
subjectFavoring BSD based bash, ( os x )
commit 27aee4d5c96041b47e28081b23a586757983a7a5
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2014-12-21T12:30:42Z

    Favoring BSD based bash, ( os x )
---
 bash/bashrc/package.sh            | 2 +-
 bash/bashrc/sources/40_go-command | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/bash/bashrc/package.sh b/bash/bashrc/package.sh
index 47ed720..36859d4 100644
--- a/bash/bashrc/package.sh
+++ b/bash/bashrc/package.sh
@@ -13,7 +13,7 @@ function __func_help() {
 SDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/sources
 
 echo "Begin source:"
-for i in $( find $SDIR -maxdepth 1 -type f -executable | sort )
+for i in $( find $SDIR -maxdepth 1 -type f -perm +111 | sort )
 do
     echo "  Source:" $( basename $i )
     . $i
diff --git a/bash/bashrc/sources/40_go-command b/bash/bashrc/sources/40_go-command
index cc5ec76..466b868 100755
--- a/bash/bashrc/sources/40_go-command
+++ b/bash/bashrc/sources/40_go-command
@@ -95,8 +95,9 @@ __go_nav() {
         LISTOF=''
         for i in "${!PWDA[@]}"
         do
+            MARK=$i
             if [[ "${PWDA[$i]}" =~ $ARG3 ]]; then
-                MARK=$i
+                break
             fi
 
             if [[ -n "${PWDA[$i]}" ]]; then