File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,16 @@ if set -q MANPATH[1]
2727 set -gx MANPATH " " $MANPATH
2828end
2929
30- # Prefer a terminal-provided startup timestamp so Fish startup avoids extra
31- # subprocesses just to measure prompt latency.
30+ # Prefer a terminal-provided startup timestamp. Fall back to a one-time
31+ # timestamp capture so the initial Starship right prompt can still show shell
32+ # startup duration outside terminal wrappers like Ghostty.
33+ if status is-interactive; and not set -q __BRADEN_SHELL_START_REAL
34+ if command -q perl
35+ set -gx __BRADEN_SHELL_START_REAL (command perl -MTime ::HiRes=time -e ' printf "%.6f\ n", time' )
36+ else if command -q python3
37+ set -gx __BRADEN_SHELL_START_REAL (command python3 -c ' import time; print(f"{time.time():.6f}")' )
38+ end
39+ end
3240
3341if test -d /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
3442 set -gx JAVA_HOME /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
You can’t perform that action at this time.
0 commit comments