aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/path.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-20 17:34:42 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-20 17:34:42 +1200
commit8ec528a533b921b24572468e591c36fe5269a0a9 (patch)
treea899184f6726a291956f21528a3c551f69aeeeec /sh/shrc.d/path.sh
parentWrite path() help to stderr if unrec command (diff)
downloaddotfiles-8ec528a533b921b24572468e591c36fe5269a0a9.tar.gz
dotfiles-8ec528a533b921b24572468e591c36fe5269a0a9.zip
Correct empty var reference
Diffstat (limited to 'sh/shrc.d/path.sh')
-rw-r--r--sh/shrc.d/path.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/sh/shrc.d/path.sh b/sh/shrc.d/path.sh
index 0b9e7e94..81823395 100644
--- a/sh/shrc.d/path.sh
+++ b/sh/shrc.d/path.sh
@@ -49,8 +49,7 @@ path() {
return 1
fi
PATH=$(
- # shellcheck disable=SC2031
- path=:$path:
+ path=:$PATH:
path=${path%%:"$2":*}:${path#*:"$2":}
path=${path#:}
path=${path%:}