Description
Feature Request
Is your feature request related to a problem? Please describe.
Currently there's no way to set the path segment separator, which would be useful for platform consistency and customization.
For example, Windows separates segments with \
all around the OS, and even though in PowerShell you can tab-complete with a forward slash, it still changes it to a backslash.
~
❯ cd .\Workspaces\
~/Workspaces
❯ cd .\example\
~/Workspaces/example
❯
This is inconsistent, and at least to me it just doesn't look great!
Describe the solution you'd like
Adding an option to the Directory module would solve this problem. Without having given it much thought, path_segment_separator
seems fitting (although maybe too verbose).
This allows the user to choose whether they want to fit with their platform, gives them freedom to customize it as they see fit, and provides a sane default (/
).
[directory]
path_segment_separator = "\\"
~\Workspaces\example
❯
And with path_segment_separator = " > "
~ > Workspaces > example
❯
Describe alternatives you've considered
Platform detection
Ultimately this takes agency away from the user, and could introduce inconsistencies with how the platforms are actually detected. Adding an option feels more inline with this project.
Doing nothing
I've done this so far and it's still bothering me 😉