[PR #501] [MERGED] Fix piping of input into rec command #495

Closed
opened 2026-02-25 20:33:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/501
Author: @ku1ik
Created: 5/15/2022
Status: Merged
Merged: 5/16/2022
Merged by: @ku1ik

Base: developHead: better-rec-input


📝 Commits (3)

  • 4792f8d Fix piping of input into rec command
  • 8b1ea57 Gracefully shutdown worker processes upon KeyboardInterrupt
  • 8c9475a Fix inheritance in async_worker

📊 Changes

3 files changed (+23 additions, -30 deletions)

View changed files

📝 asciinema/async_worker.py (+7 -1)
📝 asciinema/pty_.py (+14 -21)
📝 asciinema/recorder.py (+2 -8)

📄 Description

This improves input handling for rec command:

  • we now always read keys from stdin only, while previously we read from both stdin and directly from tty, which was problematic when piping
  • keyboard interrupt is now handled in a more graceful way

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/asciinema/asciinema/pull/501 **Author:** [@ku1ik](https://github.com/ku1ik) **Created:** 5/15/2022 **Status:** ✅ Merged **Merged:** 5/16/2022 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `develop` ← **Head:** `better-rec-input` --- ### 📝 Commits (3) - [`4792f8d`](https://github.com/asciinema/asciinema/commit/4792f8d8a3b96ff584748b632dd871019fd3a6ad) Fix piping of input into `rec` command - [`8b1ea57`](https://github.com/asciinema/asciinema/commit/8b1ea57eb6400ed6e62e1169b078f8bf6981f8c6) Gracefully shutdown worker processes upon KeyboardInterrupt - [`8c9475a`](https://github.com/asciinema/asciinema/commit/8c9475a2364fe0100e134beba94724a62a75fb45) Fix inheritance in async_worker ### 📊 Changes **3 files changed** (+23 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `asciinema/async_worker.py` (+7 -1) 📝 `asciinema/pty_.py` (+14 -21) 📝 `asciinema/recorder.py` (+2 -8) </details> ### 📄 Description This improves input handling for `rec` command: - we now always read keys from stdin only, while previously we read from both stdin and directly from tty, which was problematic when piping - keyboard interrupt is now handled in a more graceful way --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 20:33:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#495
No description provided.