mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
3ec46f480b
commit
08c0d9a957
|
@ -4,14 +4,19 @@ export CONDA_PROMPT_MODIFIER=false
|
||||||
|
|
||||||
TIMER_START="/tmp/${USER}.start.$$"
|
TIMER_START="/tmp/${USER}.start.$$"
|
||||||
|
|
||||||
PS0='$(::OMP:: --millis > $TIMER_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() {
|
function _omp_hook() {
|
||||||
local ret=$?
|
local ret=$?
|
||||||
|
|
||||||
omp_stack_count=$((${#DIRSTACK[@]} - 1))
|
omp_stack_count=$((${#DIRSTACK[@]} - 1))
|
||||||
omp_elapsed=-1
|
omp_elapsed=-1
|
||||||
if [[ -f $TIMER_START ]]; then
|
if [[ -f "$TIMER_START" ]]; then
|
||||||
omp_now=$(::OMP:: --millis)
|
omp_now=$(::OMP:: --millis)
|
||||||
omp_start_time=$(cat "$TIMER_START")
|
omp_start_time=$(cat "$TIMER_START")
|
||||||
omp_elapsed=$((omp_now-omp_start_time))
|
omp_elapsed=$((omp_now-omp_start_time))
|
||||||
|
|
Loading…
Reference in a new issue