Load configuration from XDG system config#12945
Closed
mjrochford wants to merge 6 commits into
Closed
Conversation
emits empty file without the flush on zig-0.15.2
Dir.iter allows searching all relevant directories for program files
Contributor
|
Hi @mjrochford, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #4506
Builds on: #4584
This PR is a continuation of #4845, It adds internal_os.xdg.Dir which allows using XDG_CONFIG_DIRS
to load system and user config files from XDG standard paths. I believe I have addressed the issues
raised in the previous PRs; Garbled directory was caused by a use after free to me misunderstanding
that
deferis block scoped not function scoped.The configs are applied in reverse order from last to first, followed by the User config file which has highest precedence.
Thanks to jcollie for starting on this issue.
Windows support is out of scope for this PR.
AI Disclaimer:
I used Claude as a pair programmer for code review and to catch bugs during development.
The design, implementation, and final code are my own.
See also: