[GH-ISSUE #222] asciicast v2: environment variable capture spec #163

Closed
opened 2026-02-25 20:32:56 +03:00 by kerem · 1 comment
Owner

Originally created by @ku1ik on GitHub (Sep 4, 2017).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/222

As mentioned here https://github.com/asciinema/asciinema/pull/196#issuecomment-288148352 the set of environment variables saved by asciinema rec in env map should be defined/controlled.

What could work is to have a white-list of env variables saved under env key in the recording header. It could default to SHELL,TERM and you could override it either via command line switch when recording or via config file option.

Having this, if you also want to save $USER, $HOSTNAME and $CUSTOM_STUFF you could set the white-list to for SHELL,TERM,USER,HOSTNAME,CUSTOM_STUFF and have all the information that's useful to you.

Originally created by @ku1ik on GitHub (Sep 4, 2017). Original GitHub issue: https://github.com/asciinema/asciinema/issues/222 As mentioned here https://github.com/asciinema/asciinema/pull/196#issuecomment-288148352 the set of environment variables saved by `asciinema rec` in `env` map should be defined/controlled. What could work is to have a white-list of env variables saved under `env` key in the recording header. It could default to `SHELL,TERM` and you could override it either via command line switch when recording or via config file option. Having this, if you also want to save `$USER`, `$HOSTNAME` and `$CUSTOM_STUFF` you could set the white-list to for `SHELL,TERM,USER,HOSTNAME,CUSTOM_STUFF` and have all the information that's useful to you.
kerem closed this issue 2026-02-25 20:32:56 +03:00
Author
Owner

@ku1ik commented on GitHub (Sep 16, 2017):

This has been implemented in #230 and will be released with the upcoming asciinema 2.0.

<!-- gh-comment-id:329994491 --> @ku1ik commented on GitHub (Sep 16, 2017): This has been implemented in #230 and will be released with the upcoming asciinema 2.0.
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#163
No description provided.