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

Allowing path segment separator customization #1222

Open
clo4 opened this issue May 16, 2020 · 8 comments · May be fixed by #5030 or #5727
Open

Allowing path segment separator customization #1222

clo4 opened this issue May 16, 2020 · 8 comments · May be fixed by #5030 or #5727
Labels
✨ enhancement A new feature implementation.

Comments

@clo4
Copy link

clo4 commented May 16, 2020

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 😉

@clo4 clo4 added the ✨ enhancement A new feature implementation. label May 16, 2020
@davidkna
Copy link
Member

this is being worked on in #1209

@clo4
Copy link
Author

clo4 commented May 16, 2020

Wonderful! Missed that PR, thanks for point it out!

@clo4 clo4 closed this as completed May 16, 2020
@clux
Copy link

clux commented Sep 25, 2021

Given some interest, maybe this could be re-opened since #1209 died?

@matchai matchai reopened this Sep 26, 2021
@ritzmann
Copy link

That would be lovely. This is the one thing that keeps me from having a prompt similar to powerline:
 ~  dir 

@ofek
Copy link

ofek commented Jun 20, 2022

It would be nice to have the platform separator as a variable too so one could do:

[directory]
truncation_symbol = "…$pathsep"

@lenidh lenidh linked a pull request Mar 27, 2023 that will close this issue
5 tasks
@rozbo
Copy link

rozbo commented Jan 11, 2024

almost 4 years have passed, any news here?

@scolby33
Copy link

I would be happy to rebase and update the PR #5030 if necessary

@ofek
Copy link

ofek commented Jan 12, 2024

That would be quite helpful I think; I'm sure maintainers would be more willing to review something that could be immediately merged.

@scolby33 scolby33 linked a pull request Jan 25, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement A new feature implementation.
Projects
None yet
8 participants