mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Don't pay extra forking cost when config is disabled
This commit is contained in:
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…
Reference in New Issue
Block a user