Skip to content

Commit 57e4876

Browse files
authored
revert: use safe parameter checks in bash/zsh init for set -u compatibility
1 parent 12d4b2f commit 57e4876

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/shell/scripts/omp.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function _omp_hook() {
116116
_omp_stack_count=$((${#DIRSTACK[@]} - 1))
117117

118118
_omp_execution_time=-1
119-
if [[ -n "${_omp_start_time+x}" ]]; then
119+
if [[ $_omp_start_time ]]; then
120120
local omp_now=$("$_omp_executable" get millis)
121121
_omp_execution_time=$((omp_now - _omp_start_time))
122122
_omp_no_status=false

src/shell/scripts/omp.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function _omp_precmd() {
6363
_omp_no_status=true
6464
_omp_tooltip_command=''
6565

66-
if [ -n "${_omp_start_time+x}" ]; then
66+
if [ $_omp_start_time ]; then
6767
local omp_now=$($_omp_executable get millis)
6868
_omp_execution_time=$(($omp_now - $_omp_start_time))
6969
_omp_no_status=false

0 commit comments

Comments
 (0)