feat: Allow path separator customization #5727
Open
+293
−123
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.
Description
This is based on #5030, just updated against current master and resolved conflicts. The following description is mostly copied from that PR description.
Adds a new option
separator_symbol
to the directory module, that allows to define a replacement for the default/OS path separator.The option is set to an empty string by default, which basically deactivates it and makes it backward compatible to the current behavior. If set to an non empty string, it will overrule the option
use_os_path_sep
and use the value everywhere the OS specific separator would have been used.Motivation and Context
Allows to further customize the directory module, e. g. to achieve powerline style paths.
Closes #1222
Supersedes #5030
Screenshots (if appropriate):
https://user-images.githubusercontent.com/4013111/227817246-d2d1ab42-a7a2-4ce5-a6c3-7fcfd66741d9.png
How Has This Been Tested?
Tests included running unit tests with
cargo test
and executing a debug build with a customized configuration.Checklist: