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

[Enhancement] Work with environment variables #906

Closed
WiIIiamWei opened this issue Oct 5, 2024 · 4 comments
Closed

[Enhancement] Work with environment variables #906

WiIIiamWei opened this issue Oct 5, 2024 · 4 comments

Comments

@WiIIiamWei
Copy link

I use Windows PowerShell and I tried this (I aliased zoxide to cd properly):

PS C:\Users\William> cd %temp%
zoxide: no match found

Which is expected to be:

C:\Users\William\AppData\Local\Temp

It would be nice if zoxide could work with these, I believe so called, "enviroment variables".

Could be the similar case of #855.

@rajiknows
Copy link

we can change the poershell.txt function for __zoxide_cd
we will check if the path is present in env , if it does than we will set the dir to that path .

@ajeetdsouza
Copy link
Owner

I'm not a Windows user, but isn't %temp% the syntax of CMD.EXE? I'm not sure I've followed the use case here.

@WiIIiamWei
Copy link
Author

I'm not a Windows user, but isn't %temp% the syntax of CMD.EXE? I'm not sure I've followed the use case here.

Actually yes, blame me for not properly testing this. I only tried this on cmd because I don't want to touch my PowerShell profile to disable zoxide, and thought the same syntax would work for PowerShell. However I think it's still a small cool feature if it would work the same in PowerShell.

@ajeetdsouza
Copy link
Owner

I think that would be confusing for many users, I'd suggest wrapping the z command in your shell if you'd like this feature.

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 a pull request may close this issue.

3 participants