From 96e7746dbd910c880884d144cd245af7ca2ebe44 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: Wed, 24 Dec 2014 17:22:48 +0800 Subject: [PATCH] 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