diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-06 14:15:52 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-06 14:15:52 +0200 |
commit | 84e8cf6f049c03ad66bb6ea26067de5bb9ea9a4d (patch) | |
tree | 5c6bd595bd77c3ded113d304cb1bd1b622884b83 | |
parent | bd1bf49c6f0373559986a24130f63772b7001f92 (diff) | |
download | lbsd-84e8cf6f049c03ad66bb6ea26067de5bb9ea9a4d.tar.gz |
~/.shrc: Fix bug in 'go'
-rw-r--r-- | home/john/.bash_profile | 1 | ||||
-rw-r--r-- | home/john/.shrc | 4 |
2 files changed, 3 insertions, 2 deletions
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>&-; "$@"; } } ;; |