Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow path separator customization #5727

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

scolby33
Copy link

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?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Tests included running unit tests with cargo test and executing a debug build with a customized configuration.

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allowing path segment separator customization
2 participants