aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-20 17:36:15 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-20 17:36:15 +1200
commitea4fbf170c1076be980bcd18bf4bf31f8eff990e (patch)
treeba66636135d8004941d7ae1027788073673ccb58 /sh
parentCorrect empty var reference (diff)
downloaddotfiles-ea4fbf170c1076be980bcd18bf4bf31f8eff990e.tar.gz
dotfiles-ea4fbf170c1076be980bcd18bf4bf31f8eff990e.zip
Correct path() error messages
Diffstat (limited to 'sh')
-rw-r--r--sh/shrc.d/path.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/sh/shrc.d/path.sh b/sh/shrc.d/path.sh
index 81823395..a5940dd7 100644
--- a/sh/shrc.d/path.sh
+++ b/sh/shrc.d/path.sh
@@ -4,7 +4,7 @@ path() {
# The second argument, the directory, can never have a colon
case $2 in
*:*)
- printf >&2 'path(): Illegal colon in given directory\n'
+ printf >&2 'path(): %s illegal colon\n' "$2"
return 2
;;
esac
@@ -27,7 +27,7 @@ path() {
# Add a directory at the start of $PATH
insert)
if path check "$2" ; then
- printf >&2 'path(): %s already in PATH\n'
+ printf >&2 'path(): %s already in PATH\n' "$2"
return 1
fi
PATH=${2}${PATH:+:"$PATH"}
@@ -36,7 +36,7 @@ path() {
# Add a directory to the end of $PATH
append)
if path check "$2" ; then
- printf >&2 'path(): %s already in PATH\n'
+ printf >&2 'path(): %s already in PATH\n' "$2"
return 1
fi
PATH=${PATH:+"$PATH":}${2}
@@ -45,7 +45,7 @@ path() {
# Remove a directory from $PATH
remove)
if ! path check "$2" ; then
- printf >&2 'path(): %s not in PATH\n'
+ printf >&2 'path(): %s not in PATH\n' "$2"
return 1
fi
PATH=$(