Don't pay extra forking cost when config is disabled

pull/213/head
Florian Meinicke 5 years ago
parent ce7e96fba5
commit 763e9454b2

@ -421,9 +421,14 @@ function __bobthefish_prompt_status -S -a last_status -d 'Display flags for a no
and set superuser 1 and set superuser 1
# Jobs display # Jobs display
set num_bg_jobs (jobs -p | wc -l) if [ "$theme_display_jobs_verbose" = 'yes' ]
[ $num_bg_jobs -gt 0 ] set bg_jobs (jobs -p | wc -l)
and set bg_jobs 1 [ "$bg_jobs" -eq 0 ]
and set bg_jobs # clear it out so it doesn't show when `0`
else
jobs -p >/dev/null
and set bg_jobs 1
end
if [ "$nonzero" -o "$superuser" -o "$bg_jobs" ] if [ "$nonzero" -o "$superuser" -o "$bg_jobs" ]
__bobthefish_start_segment $color_initial_segment_exit __bobthefish_start_segment $color_initial_segment_exit

Loading…
Cancel
Save