aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/john/.shrc5
1 files changed, 2 insertions, 3 deletions
diff --git a/home/john/.shrc b/home/john/.shrc
index b230756..51d3be7 100644
--- a/home/john/.shrc
+++ b/home/john/.shrc
@@ -31,9 +31,8 @@ case "$-" in *i*)
eval name=\$$#
r=`find . -name "$name" -print -exit`
[ -z "$r" ] && { echo "$name" not found 2>&1; return 1; }
- [ -f "$r" ] && r="$(dirname "$r")"
- cd "$r" &&
- { [ $# -eq 1 ] && return; BASH_COMMAND=$* cmdtitle 2>&-; "$@"; }
+ [ -f "$r" ] && r=$(dirname "$r")
+ cd "$r" && [ $# -gt 1 ] && "$@"
}
sys() {