mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
3ec46f480b
commit
08c0d9a957
|
@ -4,6 +4,11 @@ export CONDA_PROMPT_MODIFIER=false
|
|||
|
||||
TIMER_START="/tmp/${USER}.start.$$"
|
||||
|
||||
# some environments don't have the filesystem we'd expect
|
||||
if [[ ! -d "/tmp" ]]; then
|
||||
TIMER_START="${HOME}/.${USER}.start.$$"
|
||||
fi
|
||||
|
||||
PS0='$(::OMP:: --millis > $TIMER_START)'
|
||||
|
||||
function _omp_hook() {
|
||||
|
@ -11,7 +16,7 @@ function _omp_hook() {
|
|||
|
||||
omp_stack_count=$((${#DIRSTACK[@]} - 1))
|
||||
omp_elapsed=-1
|
||||
if [[ -f $TIMER_START ]]; then
|
||||
if [[ -f "$TIMER_START" ]]; then
|
||||
omp_now=$(::OMP:: --millis)
|
||||
omp_start_time=$(cat "$TIMER_START")
|
||||
omp_elapsed=$((omp_now-omp_start_time))
|
||||
|
|
Loading…
Reference in a new issue