-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Make it XDG compliant #20
Comments
Thanks for the good idea. I'm going to continue thinking about this one. I see that there's a proposal to have If |
I wonder, does it make sense anymore to wait for |
I think @rupa has always been solely a I'm sure I'm not the only person who uses both I'd like to leave this issue open and continue to cogitate about it. In the meantime, remember that you can always set |
I did it and it doesn't work. I added in .zshrc string |
@eugene-reim Strange -- it works for me. Would you mind posting your whole |
Yep, sure. |
In line 93, you have
Let me know if that works. |
Oh, sorry, I really didn't notice. I'll try it now, thanks. |
Yeah it works! Thank you so much and happy New Year btw! |
@eugene-reim Happy New Year! |
Any updates on this? |
Thanks for your comments and your pull request. My original reason for hesitating to change Zsh-z's behavior regarding data file location remains the same: my utility still enjoys total interoperability with the original rupa/z, and I still use If we adopt your solution, we please one group of people who value the home directory tidiness that XDG compliance affords, and we allow them to remove one line from their More importantly, though, changing the code is easy, but a seamless rollout of the new behavior is hard to accomplish. People are going to wonder why deleting I would like to keep this issue open, because I value the aims of the XDG specification. But I am even more interested in continuing to give my users a smooth and predictable experience. |
@agkozak There are a few things I want to address.
This phrasing is too reductive. There are many advantages of XDG compliance, tidiness is just a small part, and focusing on it makes it seem as though it's just about user preference for organization rather than something that has more meaningful impact. (Of which there are many, tidiness is far from the only— or even the primary—reason for XDG compliance).
Of course we are slightly inconveniencing them. However, I expect that the vast majority of users of this extension are not regularly using both bash and zsh. Furthermore, of those that are, I would venture to say that they are likely far more likely to be quite comfortable editing their rcfiles and tweaking the two to work together.
My PR did have a small migration script for copying I personally grow quite tired of the nods towards backwards compatibility preventing software from having proper, correct, or reasonable behavior. You can communicate with your users via changelogs. Spit out the changelog in the console when you detect a version upgrade. Spit out a big glaring message that requires affirmation from the user before updating to continue. There's a myriad of ways to do migration without upsetting users.
You might ask your users rather than making assumptions. I would always prefer to have well-written software that respects standards. As a final alternative, you can just detect the presence of the At the bare minimum, new installs of Finally, I want to note that waiting for Another possible solution would be to prompt the user for |
Making the extension XDG compliant should be pretty straightforward: Simply replace
local datafile=${ZSHZ_DATA:-${_Z_DATA:-${HOME}/.z}}
withlocal datafile=${ZSHZ_DATA:-${_Z_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/zsh/z}}
(not tested).Implementing it in a backwards-compatible way is a bit less straightforward though: The default file path case needs to check the legacy location in home first and then handle if it exists.
The text was updated successfully, but these errors were encountered: