aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-23 14:17:52 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-23 14:17:52 +1300
commit99cecf92181e768500c9ede243e1fef9dee9ba0a (patch)
tree3808e60c7e3aefa082d7f1bde7ca32e1bc13229c /bash/bashrc.d/prompt.bash
parentShow nice level of current process if /proc (diff)
downloaddotfiles-99cecf92181e768500c9ede243e1fef9dee9ba0a.tar.gz
dotfiles-99cecf92181e768500c9ede243e1fef9dee9ba0a.zip
Counted fields wrong
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index d6a2f65a..e96d9b24 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -240,7 +240,7 @@ prompt() {
((jobc++))
done < <(jobs -p)
if ((jobc > 0)) ; then
- printf '{%d}' "$jobc"
+ printf '{%u}' "$jobc"
fi
;;
@@ -248,10 +248,10 @@ prompt() {
# systems only)
nice)
if [[ -r /proc/"$$"/stat ]] ; then
- read -r _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nice _ \
+ read -r _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nice _ \
< /proc/"$$"/stat
- if ((nice != 20)) ; then
- printf '^%d' "$((nice - 20))"
+ if ((nice != 0)) ; then
+ printf '^%d' "$nice"
fi
fi
;;