feat: shell integration (OSC 133)
Terminals now pick up OSC 133 prompt/command/output/finished marks, which the VT parser ignores: a scanner (app/src/osc.rs, split-safe across reads, bodies capped at 4 KiB) finds them in the output stream and each mark records the cursor line. Lines are stable indexes that account for lines a full scrollback rotates out, so marks stay on their text; clearing the scrollback drops them. With marks present: Ctrl/Cmd+Shift+Up/Down and Previous/Next Prompt in the context menu jump between prompts, Copy Last Command Output copies what the last finished command printed, and a green/red bar beside each prompt shows the exit status (hover for code and duration). OSC 7 working-directory reports are parsed too (used by the next change). The manual shows bash and zsh snippets; fish 4 and common prompt themes already send the marks.
This commit is contained in:
+2
-1
@@ -846,7 +846,8 @@ impl App {
|
||||
t.reset();
|
||||
}
|
||||
}
|
||||
MenuAction::Copy | MenuAction::SelectAll => {}
|
||||
// Handled inside the terminal view.
|
||||
MenuAction::Copy | MenuAction::SelectAll | MenuAction::PrevPrompt | MenuAction::NextPrompt | MenuAction::CopyOutput => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user