Fix jobs item

This commit is contained in:
Ilan Cosman 2020-11-25 11:54:17 -08:00
parent 7747a257a3
commit 7b25cc7b4c
2 changed files with 6 additions and 4 deletions

View File

@ -1,9 +1,9 @@
function _tide_item_jobs
if jobs --quiet # Use --quiet because its faster and most people wont use verbose
if test $_tide_jobs_number -gt 0
set_color $tide_jobs_color
if test "$tide_jobs_verbose" = true
printf '%s' $tide_jobs_icon ' '(jobs --pid | count) # --pid because it's faster than just jobs
printf '%s' $tide_jobs_icon' ' $_tide_jobs_number
else
printf '%s' $tide_jobs_icon
end

View File

@ -2,9 +2,11 @@ _tide_detect_os
_tide_git_prompt_set_vars
function fish_prompt
set -lx _tide_last_pipestatus $pipestatus
set -lx _tide_last_status $status
set -lx _tide_jobs_number (jobs --pid | count)
fish --command "
set -g _tide_last_pipestatus $pipestatus
set -g _tide_last_status $status
set -g _tide_fish_pid $fish_pid
test -n \"$SSH_TTY\" && set -g SSH_TTY