aboutsummaryrefslogtreecommitdiff
path: root/home/john/.shrc
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-06 14:15:52 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-06 14:15:52 +0200
commit84e8cf6f049c03ad66bb6ea26067de5bb9ea9a4d (patch)
tree5c6bd595bd77c3ded113d304cb1bd1b622884b83 /home/john/.shrc
parentbd1bf49c6f0373559986a24130f63772b7001f92 (diff)
downloadlbsd-84e8cf6f049c03ad66bb6ea26067de5bb9ea9a4d.tar.gz
~/.shrc: Fix bug in 'go'
Diffstat (limited to 'home/john/.shrc')
-rw-r--r--home/john/.shrc4
1 files changed, 2 insertions, 2 deletions
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>&-; "$@"; }
}
;;