feat(bash): support global .Jobs by passing --job-count

resolves #7463
This commit is contained in:
Jan De Dobbeleer
2026-04-28 08:10:54 +02:00
parent 4088f2f000
commit 70870428a1
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ func (f Features) Bash() Code {
--pipestatus="${_omp_pipestatus[*]}" \
--no-status="$_omp_no_status" \
--execution-time="$_omp_execution_time" \
--job-count="$_omp_job_count" \
--stack-count="$_omp_stack_count" \
--terminal-width="${COLUMNS-0}" \
--escape=false
+1
View File
@@ -44,6 +44,7 @@ bleopt prompt_rps1='$(
--pipestatus="${_omp_pipestatus[*]}" \
--no-status="$_omp_no_status" \
--execution-time="$_omp_execution_time" \
--job-count="$_omp_job_count" \
--stack-count="$_omp_stack_count" \
--terminal-width="${COLUMNS-0}" \
--escape=false
+5
View File
@@ -11,6 +11,7 @@ export PYENV_VIRTUALENV_DISABLE_PROMPT=1
# global variables
_omp_start_time=''
_omp_stack_count=0
_omp_job_count=0
_omp_execution_time=-1
_omp_no_status=true
_omp_status=0
@@ -85,6 +86,7 @@ function _omp_get_primary() {
--pipestatus="${_omp_pipestatus[*]}" \
--no-status="$_omp_no_status" \
--execution-time="$_omp_execution_time" \
--job-count="$_omp_job_count" \
--stack-count="$_omp_stack_count" \
--terminal-width="${COLUMNS-0}" |
tr -d '\0'
@@ -114,6 +116,9 @@ function _omp_hook() {
fi
_omp_stack_count=$((${#DIRSTACK[@]} - 1))
local _omp_jobs=()
_omp_jobs=($(jobs -p 2>/dev/null))
_omp_job_count=${#_omp_jobs[@]}
_omp_execution_time=-1
if [[ $_omp_start_time ]]; then