dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit cc70191cf1da566f1992c55c9552ded9d684a1dc
parent e4a152bd56a4abd6c87d3f5bbefb5bfc0c22e9e1
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Sun, 10 Mar 2019 14:24:59 +0100

Fix bug with displaying number of background processes

`jobs -l` prints an additional line indicating when the directory has changed.
We therefore grep only lines with a job id inside squared brackets.

Diffstat:
Mzsh/zsh_functions | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zsh/zsh_functions b/zsh/zsh_functions @@ -25,7 +25,7 @@ function get_stripped_dir_count() { # Function to parse the number of background processes function bg_process() { - NUM_BG=$(jobs -l | wc -l) + NUM_BG=$(jobs -l | grep "\[[0-9]\+\]" | wc -l) if [ ! "$NUM_BG" -eq "0" ]; then echo "[bg: $NUM_BG]" fi