[PR #102] [MERGED] Add environment variable ASCIINEMA_CONFIG_HOME for customizing path to the config dir #999

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

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/102
Author: @zmwangx
Created: 5/23/2015
Status: Merged
Merged: 5/23/2015
Merged by: @ku1ik

Base: masterHead: asciinema-config-patch


📝 Commits (1)

  • fd38b0f check a list of locations for the config file

📊 Changes

1 file changed (+27 additions, -6 deletions)

View changed files

📝 util/cfg.go (+27 -6)

📄 Description

Currently the config path $HOME/.asciinema/config is hard-coded, which is not so cool for users who keep all their config stuff in $HOME/.config for a cleaner HOME and easier backup (following the XDG Base Directory Specification). Therefore, I'm introducing an ASCIINEMA_CONFIG environment variable in this PR to let users keep their config files wherever they want. (Personally I would set it to $HOME/.config/asciinema/config.)


🔄 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/102 **Author:** [@zmwangx](https://github.com/zmwangx) **Created:** 5/23/2015 **Status:** ✅ Merged **Merged:** 5/23/2015 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `master` ← **Head:** `asciinema-config-patch` --- ### 📝 Commits (1) - [`fd38b0f`](https://github.com/asciinema/asciinema/commit/fd38b0f453598ebb8cc70a63ff2348ebabfdaafb) check a list of locations for the config file ### 📊 Changes **1 file changed** (+27 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `util/cfg.go` (+27 -6) </details> ### 📄 Description Currently the config path `$HOME/.asciinema/config` is hard-coded, which is not so cool for users who keep all their config stuff in `$HOME/.config` for a cleaner `HOME` and easier backup (following the [XDG Base Directory Specification](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)). Therefore, I'm introducing an `ASCIINEMA_CONFIG` environment variable in this PR to let users keep their config files wherever they want. (Personally I would set it to `$HOME/.config/asciinema/config`.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:13:02 +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#999
No description provided.