[PR #547] [CLOSED] Add --suppress-output flag to record command #1118

Closed
opened 2026-03-15 11:19:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/547
Author: @DavidVentura
Created: 4/27/2023
Status: Closed

Base: mainHead: suppress-output


📝 Commits (1)

  • 0123f13 Add --suppress-output flag to record command

📊 Changes

8 files changed (+88 additions, -1 deletions)

View changed files

📝 asciinema/__init__.py (+2 -0)
📝 asciinema/__main__.py (+6 -0)
📝 asciinema/commands/record.py (+2 -0)
📝 asciinema/config.py (+4 -0)
📝 asciinema/pty_.py (+3 -1)
📝 asciinema/recorder.py (+2 -0)
📝 tests/config_test.py (+11 -0)
📝 tests/pty_test.py (+58 -0)

📄 Description

Hi

This PR implements a new flag for the record command: --suppress-output.
This allows certain use-cases, like running recorded integration tests in CI without the commands' output polluting logs.

I've only added unit-tests, as I could not get the expected integration test to work in asciinema before my changes:

$ asciinema rec --overwrite -q  -c "echo 'this is a very nice message'" out.rec | wc -c
this is a very nice message
0

I would've expected wc to return 28.

Which I'd have compared with

$ asciinema rec --overwrite -q --suppress-output  -c "echo 'this is a very nice message'" out.rec  | wc -c
0
$

🔄 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/547 **Author:** [@DavidVentura](https://github.com/DavidVentura) **Created:** 4/27/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `suppress-output` --- ### 📝 Commits (1) - [`0123f13`](https://github.com/asciinema/asciinema/commit/0123f13940e32f6e87d5f69a7b60a6fc6f391b9b) Add `--suppress-output` flag to `record` command ### 📊 Changes **8 files changed** (+88 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `asciinema/__init__.py` (+2 -0) 📝 `asciinema/__main__.py` (+6 -0) 📝 `asciinema/commands/record.py` (+2 -0) 📝 `asciinema/config.py` (+4 -0) 📝 `asciinema/pty_.py` (+3 -1) 📝 `asciinema/recorder.py` (+2 -0) 📝 `tests/config_test.py` (+11 -0) 📝 `tests/pty_test.py` (+58 -0) </details> ### 📄 Description Hi This PR implements a new flag for the `record` command: `--suppress-output`. This allows certain use-cases, like running recorded integration tests in CI without the commands' output polluting logs. I've only added unit-tests, as I could not get the expected integration test to work in `asciinema` before my changes: ``` $ asciinema rec --overwrite -q -c "echo 'this is a very nice message'" out.rec | wc -c this is a very nice message 0 ``` I would've expected `wc` to return `28`. Which I'd have compared with ``` $ asciinema rec --overwrite -q --suppress-output -c "echo 'this is a very nice message'" out.rec | wc -c 0 $ ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:19:34 +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#1118
No description provided.