aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-02-27 11:07:24 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-02-27 11:07:24 +1300
commit4acf2a4583d401a6a95f00ffe83e1a7d319e43fc (patch)
tree495536ac6fa8587a5630d21666f92ad1e59c441c /bash
parentAdd igex(1) (diff)
downloaddotfiles-4acf2a4583d401a6a95f00ffe83e1a7d319e43fc.tar.gz
dotfiles-4acf2a4583d401a6a95f00ffe83e1a7d319e43fc.zip
Unsigned integers for printf
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/ca.bash2
-rw-r--r--bash/bashrc.d/cf.bash2
-rw-r--r--bash/bashrc.d/prompt.bash2
3 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc.d/ca.bash b/bash/bashrc.d/ca.bash
index 11e15c1b..bda6c5cb 100644
--- a/bash/bashrc.d/ca.bash
+++ b/bash/bashrc.d/ca.bash
@@ -1,5 +1,5 @@
# Count arguments
ca() {
- printf '%d\n' "$#"
+ printf '%u\n' "$#"
}
diff --git a/bash/bashrc.d/cf.bash b/bash/bashrc.d/cf.bash
index 4109fb18..d006c680 100644
--- a/bash/bashrc.d/cf.bash
+++ b/bash/bashrc.d/cf.bash
@@ -24,7 +24,7 @@ cf() {
(
shopt -s dotglob nullglob
declare -a files=("$dirname"/*)
- printf '%d\t%s\n' "${#files[@]}" "$dirname"
+ printf '%u\t%s\n' "${#files[@]}" "$dirname"
)
}
complete -A directory cf
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index e437b9a5..307c577b 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -243,7 +243,7 @@ prompt() {
# Show return status of previous command in angle brackets, if not zero
ret)
if ((PROMPT_RETURN > 0)) ; then
- printf '<%d>' "$PROMPT_RETURN"
+ printf '<%u>' "$PROMPT_RETURN"
fi
;;