commit 96e7746dbd910c880884d144cd245af7ca2ebe44
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2014-12-24T09:22:48Z |
| subject | Fix command "go up" goes to root |
commit 96e7746dbd910c880884d144cd245af7ca2ebe44
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2014-12-24T09:22:48Z
Fix command "go up" goes to root
---
bash/bashrc/sources/40_go-command | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bash/bashrc/sources/40_go-command b/bash/bashrc/sources/40_go-command
index 466b868..f64167f 100755
--- a/bash/bashrc/sources/40_go-command
+++ b/bash/bashrc/sources/40_go-command
@@ -96,6 +96,10 @@ __go_nav() {
for i in "${!PWDA[@]}"
do
MARK=$i
+ if [[ "${PWDA[$i]}" =~ $ARG3 ]]; then
+ continue
+ fi
+
if [[ "${PWDA[$i]}" =~ $ARG3 ]]; then
break
fi