From 99cecf92181e768500c9ede243e1fef9dee9ba0a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 23 Oct 2014 14:17:52 +1300 Subject: Counted fields wrong --- bash/bashrc.d/prompt.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bash/bashrc.d/prompt.bash') 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 ;; -- cgit v1.2.3