[PR #576] [MERGED] Require explicit upload choice when recording without file arg #1130

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

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/576
Author: @ku1ik
Created: 10/18/2023
Status: Merged
Merged: 10/23/2023
Merged by: @ku1ik

Base: developHead: better-upload-prompt


📝 Commits (1)

  • c86035d Require explicit upload confirmation when recording without file argument

📊 Changes

2 files changed (+32 additions, -13 deletions)

View changed files

📝 asciinema/commands/command.py (+4 -0)
📝 asciinema/commands/record.py (+28 -13)

📄 Description

This changes the prompt for upload from simply accepting <enter> key as upload confirmation to requiring explicitly typing u<enter>. Also, lets saving locally in tmp directory (what was previously achieved with <ctrl-c>, and adds discard option too.

$ asciinema rec
asciinema: recording asciicast to /tmp/tmpo8_612f8-ascii.cast
asciinema: press <ctrl-d> or type "exit" when you're done
$ echo hello
hello
$ exit 
asciinema: recording finished
(s)ave locally, (u)pload to asciinema.org, (d)iscard
[s,u,d]? _

If none of s, u, d are entered (which includes just hitting enter) then the prompt is displayed again, until valid choice is made. <ctrl-c> works as it did in previous versions, which is equivalent to s (save).

Discussed in:


🔄 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/576 **Author:** [@ku1ik](https://github.com/ku1ik) **Created:** 10/18/2023 **Status:** ✅ Merged **Merged:** 10/23/2023 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `develop` ← **Head:** `better-upload-prompt` --- ### 📝 Commits (1) - [`c86035d`](https://github.com/asciinema/asciinema/commit/c86035d41594ef44633605c296d0b5a228b74ea0) Require explicit upload confirmation when recording without file argument ### 📊 Changes **2 files changed** (+32 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `asciinema/commands/command.py` (+4 -0) 📝 `asciinema/commands/record.py` (+28 -13) </details> ### 📄 Description This changes the prompt for upload from simply accepting `<enter>` key as upload confirmation to requiring explicitly typing `u<enter>`. Also, lets saving locally in tmp directory (what was previously achieved with `<ctrl-c>`, and adds discard option too. ``` $ asciinema rec asciinema: recording asciicast to /tmp/tmpo8_612f8-ascii.cast asciinema: press <ctrl-d> or type "exit" when you're done $ echo hello hello $ exit asciinema: recording finished (s)ave locally, (u)pload to asciinema.org, (d)iscard [s,u,d]? _ ``` If none of `s`, `u`, `d` are entered (which includes just hitting enter) then the prompt is displayed again, until valid choice is made. `<ctrl-c>` works as it did in previous versions, which is equivalent to `s` (save). Discussed in: - https://github.com/orgs/asciinema/discussions/21 - https://github.com/orgs/asciinema/discussions/31 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:20:06 +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#1130
No description provided.