aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-08-21 16:26:30 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-08-21 16:26:30 +1200
commitc740ed2e0764e9cd88b6a80a9214cc5d770890e7 (patch)
treed015c9fee5cec2b6a60cdf594380ca377d122248
parentReplace stray [ test with [[ in prompt script (diff)
downloaddotfiles-c740ed2e0764e9cd88b6a80a9214cc5d770890e7.tar.gz
dotfiles-c740ed2e0764e9cd88b6a80a9214cc5d770890e7.zip
Standardise use of printf
-rw-r--r--bash/bashrc.d/cd.bash2
-rw-r--r--bash/bashrc.d/grep.bash2
-rw-r--r--bash/bashrc.d/ls.bash2
-rwxr-xr-xinstall2
4 files changed, 4 insertions, 4 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash
index 4f3d5f64..fedb19f5 100644
--- a/bash/bashrc.d/cd.bash
+++ b/bash/bashrc.d/cd.bash
@@ -11,7 +11,7 @@ cd() {
if [[ $PWD == *$1* ]]; then
builtin cd "${opts[@]}" "${PWD/$1/$2}"
else
- printf "bash: cd: could not replace substring\n" >&2
+ printf %s "bash: cd: could not replace substring\n" >&2
return 1
fi
else
diff --git a/bash/bashrc.d/grep.bash b/bash/bashrc.d/grep.bash
index e3efe13c..440c8f70 100644
--- a/bash/bashrc.d/grep.bash
+++ b/bash/bashrc.d/grep.bash
@@ -28,7 +28,7 @@ __grepopts() {
fi
# Print the options as a single string, space-delimited
- printf '%s' "${grepopts[*]}"
+ printf %s "${grepopts[*]}"
}
# Alias grep with those options
diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash
index 4890d1ac..6fa20da9 100644
--- a/bash/bashrc.d/ls.bash
+++ b/bash/bashrc.d/ls.bash
@@ -15,7 +15,7 @@ __lsopts() {
fi
# Print the options as a single string, space-delimited
- printf '%s' "${lsopts[*]}"
+ printf %s "${lsopts[*]}"
}
# Alias ls with these options
diff --git a/install b/install
index 389531ff..949c0498 100755
--- a/install
+++ b/install
@@ -3,7 +3,7 @@
# Define dotfiles directory and check it exists
dotfiles=$HOME/.dotfiles
if [[ ! -d $dotfiles ]]; then
- printf "Could not find $dotfiles!\n" >&2
+ printf %s "Could not find $dotfiles!\n" >&2
exit 1
fi