From 8ec528a533b921b24572468e591c36fe5269a0a9 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 20 Aug 2016 17:34:42 +1200 Subject: Correct empty var reference --- sh/shrc.d/path.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sh') 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%:} -- cgit v1.2.3