diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-20 17:34:42 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-20 17:34:42 +1200 |
commit | 8ec528a533b921b24572468e591c36fe5269a0a9 (patch) | |
tree | a899184f6726a291956f21528a3c551f69aeeeec /sh/shrc.d/path.sh | |
parent | Write path() help to stderr if unrec command (diff) | |
download | dotfiles-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.sh | 3 |
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%:} |