mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[PR #723] [CLOSED] Add support for attaching to existing shell sessions #1212
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#1212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/asciinema/asciinema/pull/723
Author: @usman-heracles
Created: 2/7/2026
Status: ❌ Closed
Base:
develop← Head:feature/attach-existing-pty📝 Commits (1)
7728ec7Add support for attaching to existing shell sessions📊 Changes
5 files changed (+309 additions, -36 deletions)
View changed files
📝
src/cli.rs(+77 -0)📝
src/cmd/session.rs(+24 -1)📝
src/main.rs(+4 -0)📝
src/pty.rs(+152 -8)📝
src/session.rs(+52 -27)📄 Description
Summary
Adds the ability to record or stream an already-running shell session instead of always spawning a new one. This is implemented via two new CLI options:
--pty <PATH>- Attach directly to a PTY device (e.g.,/dev/pts/5on Linux or/dev/ttys005on macOS)--pid <PID>- Resolve a process ID to its controlling PTY and attach to itUse Cases
Usage Examples
Implementation Details
rec,stream, andsessioncommandsTest plan
--ptyoption works with Linux PTY paths--ptyoption works with macOS PTY paths--pidoption resolves to correct PTY on Linux--pidoption resolves to correct PTY on macOS🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.