Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add background job count when >1 #3

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions functions/fish_right_prompt.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function fish_right_prompt
set -l exit_code $status
set -l cmd_duration $CMD_DURATION
set -l background_count (jobs | wc -l | tr -d ' ')
__tmux_prompt
if test $exit_code -ne 0
set_color red
Expand All @@ -15,6 +16,10 @@ function fish_right_prompt
end
printf ' (%s)' (__print_duration $cmd_duration)
set_color 666666
if [ $background_count -gt 0 ]
set_color purple
printf " ($background_count bg)"
end
printf ' < %s' (date +%H:%M:%S)
set_color normal
end
Expand Down