fix(bash): get terminal width from COLUMNS

resolves #5090
This commit is contained in:
Jan De Dobbeleer 2024-06-15 17:34:17 +02:00 committed by Jan De Dobbeleer
parent 1cb6a3c855
commit 4ed8104d2d

View file

@ -65,7 +65,7 @@ function _omp_hook() {
set_poshcontext
_set_posh_cursor_position
PS1="$(::OMP:: print primary --config="$POSH_THEME" --shell=bash --shell-version="$BASH_VERSION" --status="$ret" --pipestatus="${pipeStatus[*]}" --execution-time="$omp_elapsed" --stack-count="$omp_stack_count" --no-status="$no_exit_code" | tr -d '\0')"
PS1="$(::OMP:: print primary --config="$POSH_THEME" --shell=bash --shell-version="$BASH_VERSION" --status="$ret" --pipestatus="${pipeStatus[*]}" --execution-time="$omp_elapsed" --stack-count="$omp_stack_count" --no-status="$no_exit_code" --terminal-width="$COLUMNS" | tr -d '\0')"
return $ret
}