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

Set-ZLocation and Update-ZLocation break for PS 7 if the user has defined an alias for 'find' #110

Open
astenlund opened this issue Nov 14, 2020 · 1 comment · Fixed by nohwnd/ZLocation2#8

Comments

@astenlund
Copy link

A user-defined find alias seems to override the Find function in ZLocation.LiteDB.psm1, unless the alias is defined with the Private option (just a theory though).

Steps to reproduce:

  1. Add Set-Alias find Get-Item -Option None to your PS 7 profile
  2. Open PS 7 and run some commands
  3. Run Invoke-ZLocation and notice that none of the weights have been updated
  4. Remove the alias and reload PS
  5. Everything now works

Another note: if the find alias is created with the Private option, the alias stays in user scope and does not affect the function of ZLocation.

@roachsinai
Copy link

Same issue. Does add a zfind alias for ZLocation is a good try?

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.

2 participants