From 84e8cf6f049c03ad66bb6ea26067de5bb9ea9a4d Mon Sep 17 00:00:00 2001 From: "John Ankarstr\\xf6m" Date: Sun, 6 Jun 2021 14:15:52 +0200 Subject: ~/.shrc: Fix bug in 'go' --- home/john/.bash_profile | 1 + home/john/.shrc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'home/john') diff --git a/home/john/.bash_profile b/home/john/.bash_profile index 938adb7..3987746 100644 --- a/home/john/.bash_profile +++ b/home/john/.bash_profile @@ -12,6 +12,7 @@ cmdtitle() { case "${cmd%% *}" in safetitle) return ;; screen) return ;; + go) return ;; ls) return ;; ll) return ;; mv) return ;; diff --git a/home/john/.shrc b/home/john/.shrc index 39e9dba..b15dfc2 100644 --- a/home/john/.shrc +++ b/home/john/.shrc @@ -20,8 +20,8 @@ case "$-" in *i*) eval name=\$$# r=`find . -name "$name" -print -exit` [ -z "$r" ] && { echo "$name" not found 2>&1; return 1; } - [ -f "$r" ] && name="$(dirname "$r")" - cd "$name" && + [ -f "$r" ] && r="$(dirname "$r")" + cd "$r" && { [ $# -eq 1 ] && return; BASH_COMMAND=$* cmdtitle 2>&-; "$@"; } } ;; -- cgit v1.2.3