From 27aee4d5c96041b47e28081b23a586757983a7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Sun, 21 Dec 2014 20:30:42 +0800 Subject: [PATCH] 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