diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-23 14:17:52 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-23 14:17:52 +1300 |
commit | 99cecf92181e768500c9ede243e1fef9dee9ba0a (patch) | |
tree | 3808e60c7e3aefa082d7f1bde7ca32e1bc13229c /bash/bashrc.d | |
parent | Show nice level of current process if /proc (diff) | |
download | dotfiles-99cecf92181e768500c9ede243e1fef9dee9ba0a.tar.gz dotfiles-99cecf92181e768500c9ede243e1fef9dee9ba0a.zip |
Counted fields wrong
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 8 |
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 ;; |