T34: review round 1: PowerShell reads a native program's code only when one ran in the command, by the new object each run stores, and 1 for any other failure; bash 3.2 runs the user's own DEBUG trap after its own and keeps $_, and a line that is only a subshell sends its D from the prompt by the command number; zsh marks the first prompt under a theme that sets PS1 in its own hook, through sched; each shell run gets its own folder
CI / platforms (windows-latest) (push) Successful in 1m55s
CI / platforms (ubuntu-24.04) (push) Successful in 2m50s
CI / macos (push) Successful in 12m29s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-16 22:45:25 -04:00
1 parent c53b540f42
commit 0a22200725
6 files changed
+103 -28

No files matched your search

+8 -1
View File
@@ -8,6 +8,7 @@ fi
[[ -r "${ZDOTDIR:-$HOME}/.zshenv" ]] && builtin source "${ZDOTDIR:-$HOME}/.zshenv"
if [[ -o interactive ]]; then
_ely_ran=
_ely_first=1
_ely_precmd() {
builtin local ret=$? LC_ALL=C char url=
if [[ -n $_ely_ran ]]; then
@@ -21,14 +22,20 @@ if [[ -o interactive ]]; then
url+=$char
done
builtin printf '\e]7;file://%s\a\e]2;%s\a' "$url" "${${${PWD:t}:-/}//[[:cntrl:]]/}"
# Themes set PS1 in later hooks; from the next prompt the marks go on after them.
# Themes set PS1 in later hooks: the marks go on after them, at the first prompt through sched.
precmd_functions=(${precmd_functions:#_ely_mark} _ely_mark)
if (( _ely_first )); then
_ely_first=0
builtin zmodload zsh/sched && builtin sched +0 _ely_mark $ret
fi
builtin return ret
}
_ely_mark() {
if [[ -o prompt_percent && $PS1 != *$'\e]133;A'* ]]; then
PS1=$'%{\e]133;A\a%}'$PS1$'%{\e]133;B\a%}'
fi
# sched's command leaves its status for the prompt.
builtin return ${1:-0}
}
_ely_preexec() {
_ely_ran=1