-
Notifications
You must be signed in to change notification settings - Fork 643
feat: support environment variable in cd path
#241
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
Conversation
|
Why do we need to use For example, |
|
Well, I think ACE can be avoided by wrapping the path with quote. |
|
Hmm, seems unnecessary to make it so complicated. Just expanding the system preset variables should suffice? This is just a simple replace, like |
|
On Windows, there're more presets than you might think. In my knowledge alone, there are %USERPROFILE%, %ALLUSERSPROFILE%, %TEMP%, %TMP%, %APPDATA%, %LOCALAPPDATA%, %PROGRAMDATA%, %PROGRAMFILES%, %COMMONPROGRAMFILES%,... And when you install some programs, they add more to the list (%GO_HOME%, %PYTHONPATH%, %OneDrive%,...) |
|
I found 97 variables at https://learn.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables, and I think users might not be aware of most of them. Implementing all of them would be laborious and pointless. Is it possible to implement only a portion of them or have Yazi set a unified name that can work across different systems, similar to what dirs does? Alternatively, can we directly use dirs, which is currently a dependency of Yazi? |
|
One user may not use all the variables, but a combination of many users may cover a whole lot of them. On the contrary, I don't think calling |
|
|
I think this should be built-in instead of relying on plugin, because I don't expect my file manager to be less useful than a If you don't want to use external program call, then how about just using regex to expand it? |
|
How about the proposal to make BTW, I'm not sure how about Windows, but in Unix the |
|
Currently |
|
This is a real issue, I'll try to make it done later |
|
I switched to the regex, would you like to give it a review? |
ndtoan96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review finished.
cd path
|
Thank you! |
Fix #196
This pull request implements the below features:
~on Windows