aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-06-21 01:30:37 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-06-21 01:30:37 +1200
commit5af75f56b17bcc7e8dd44d7a116177321d58515e (patch)
treefa89874e6e96271e64fcd289cfed6ff960e93192 /bash
parentCorrect error (diff)
downloaddotfiles-5af75f56b17bcc7e8dd44d7a116177321d58515e.tar.gz
dotfiles-5af75f56b17bcc7e8dd44d7a116177321d58515e.zip
More portable wc -l with sed
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 98b7a017..130a030e 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -223,7 +223,7 @@ function prompt {
# Job count prompt function.
jobs)
- [[ -n "$(jobs)" ]] && printf '{%d}' $(jobs | wc -l | sed 's/ //g')
+ [[ -n "$(jobs)" ]] && printf '{%d}' $(jobs | sed -n '$=')
;;
esac
}