diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-27 17:41:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | c11ffe24f022d61cdd479e1ee946033c42e9a08c (patch) | |
| tree | 1b54d824ff03c7d8f2df25ac70527cb9c544dcb5 | |
| parent | 281b1eb2d5249caece4ac69a7d975cb01d2e7a89 (diff) | |
| download | pardes-c11ffe24f022d61cdd479e1ee946033c42e9a08c.tar.gz pardes-c11ffe24f022d61cdd479e1ee946033c42e9a08c.zip | |
Report each command's exit status in the shell's end-of-command mark
bash and fish now print OSC 133;D;<status>, which ghostty already parses;
the planned /pane/<n>/run file reads it to answer when a command finished
and how.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| -rw-r--r-- | src/host_io.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host_io.zig b/src/host_io.zig index 72e149c9..f0a8d637 100644 --- a/src/host_io.zig +++ b/src/host_io.zig @@ -589,7 +589,7 @@ pub const Shell = struct { const bash_rc = \\[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc" \\PS1='\[\e]133;A;cl=line\a\]'"$PS1"'\[\e]133;B\a\]' - \\PROMPT_COMMAND='printf "\e]133;D\a"'"${PROMPT_COMMAND:+;$PROMPT_COMMAND}" + \\PROMPT_COMMAND='printf "\e]133;D;%s\a" "$?"'"${PROMPT_COMMAND:+;$PROMPT_COMMAND}" \\trap 'printf "\e]133;C\a"' DEBUG \\ ; @@ -606,7 +606,7 @@ pub const Shell = struct { \\ printf '\e]133;C\a' \\end \\function __pardes_postexec --on-event fish_postexec - \\ printf '\e]133;D\a' + \\ printf '\e]133;D;%s\a' $status \\end \\ ; |
