Copy Command Blocks
sivtr copy works from the structured session log created by shell integration. It does not require opening the TUI.
Basic modes
Section titled “Basic modes”sivtr copysivtr copy insivtr copy outsivtr copy cmd| Command | Copies |
|---|---|
sivtr copy | Input plus output |
sivtr copy in | Input only, including prompt by default |
sivtr copy out | Output only |
sivtr copy cmd | Bare command only |
Aliases:
| Alias | Full command |
|---|---|
sivtr c | sivtr copy |
sivtr ci | sivtr copy in |
sivtr co | sivtr copy out |
sivtr cc | sivtr copy cmd |
Select recent blocks
Section titled “Select recent blocks”Selectors are relative to the newest command block:
sivtr copy 1sivtr copy out 2sivtr copy in 2..41 is the latest block. 2 is the previous block. 2..4 selects several recent blocks.
Print after copying
Section titled “Print after copying”Use --print to see what was copied:
sivtr copy out --printThe text is still copied to the clipboard.
Preserve ANSI
Section titled “Preserve ANSI”Use --ansi when you want colored terminal sequences preserved:
sivtr copy out --ansiThis only has an effect when the session entry has ANSI-preserved output.
Rewrite the prompt
Section titled “Rewrite the prompt”Input-copying modes preserve the original prompt by default. Override it with --prompt:
sivtr copy in --prompt ":"sivtr copy --prompt ">"If the prompt does not end with whitespace, sivtr inserts one space before the command.
Filter copied text
Section titled “Filter copied text”Filters run after selected blocks are assembled.
sivtr copy out --regex panicsivtr copy out --lines 10:20sivtr copy out --lines 1,3,8:12If both filters are set, --regex runs first and --lines runs on the filtered result.
Interactive picker
Section titled “Interactive picker”Open an interactive picker:
sivtr copy --picksivtr copy out --picksivtr copy cmd --pickPicker keys:
| Key | Action |
|---|---|
j / k | Move |
Space | Toggle current entry |
v | Mark range anchor |
a | Toggle all |
p | Toggle preview |
t | Open Vim-style full view |
Enter | Confirm |
Esc | Cancel |
The Vim-style full view supports [[ and ]] to jump blocks, T to toggle tool content in Codex views, myy / myi / myo / myc to copy, and mvv / mvi / mvo to select.