Skip to content

Commit 5c71fc2

Browse files
authored
Merge pull request #3 from davidbstein/background-job
add background job count when >1
2 parents c49396f + a7a795b commit 5c71fc2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

functions/fish_right_prompt.fish

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
function fish_right_prompt
22
set -l exit_code $status
33
set -l cmd_duration $CMD_DURATION
4+
set -l background_count (jobs | wc -l | tr -d ' ')
45
__tmux_prompt
56
if test $exit_code -ne 0
67
set_color red
@@ -15,6 +16,10 @@ function fish_right_prompt
1516
end
1617
printf ' (%s)' (__print_duration $cmd_duration)
1718
set_color 666666
19+
if [ $background_count -gt 0 ]
20+
set_color purple
21+
printf " ($background_count bg)"
22+
end
1823
printf ' < %s' (date +%H:%M:%S)
1924
set_color normal
2025
end

0 commit comments

Comments
 (0)