Repository navigation
Support environment variable expansion in File Open dialog - #1007
Open
pranav sirnapalli (pranav-sirnapalli) wants to merge 1 commit into
Open
pranav sirnapalli (pranav-sirnapalli) wants to merge 1 commit into
pranav sirnapalli (pranav-sirnapalli) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
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.
Summary
Adds support for environment-variable and home-directory expansion in the File → Open dialog.
Fixes #499.
Changes
%NAME%environment variables on Windows and$NAMEon Unix, along with leading~home-directory expansion.The implementation uses the Rust standard library and introduces no new dependencies.
Testing
Automated validation
cargo test -p edit— passed (107 tests, 1 ignored).cargo +nightly test -p edit --all-targets— passed (104 unit tests, 1 ignored, plus benchmark targets).cargo +nightly fmt --all -- --check— passed.cargo +nightly clippy --all-features --all-targets -- --no-deps --deny warnings— passed.cargo build --release— passed.Manual validation on Ubuntu WSL
$VARIABLEpath.~.$HOMEand%WINDIR%without unintended expansion.Known test limitation
The all-features test configuration produces an out-of-memory failure in the existing arena allocator when the
single-threadedfeature is enabled. I reproduced the same failure inbase64::tests::test_basicon an unmodified checkout ofmain(commitb7f8322). Standard-feature tests pass.Native Windows UI behavior has not yet been manually tested; Windows-specific validation remains for CI and review.