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

feat(cross-platform): port home directory and tabbing to linux/mac friendly options #46

Merged
merged 2 commits into from Feb 20, 2020
Merged

Conversation

joejag
Copy link

@joejag joejag commented Feb 18, 2020

This addresses #44 and allows z to be used on Linux and Macs as well as Windows.

The three cross-platform bugs were:

  • $Env.USERPROFILE isn't cross-platform, $Env.HOME is
  • The Get-DirectoryEntryMatchPredicate function looks for multiple drive names, on Linux/Mac this is only / which needs escaping to be used correctly as a regular expression
  • $function:tabexpansion2 was expecting an extra carriage return in the existing function which doesn't exist on Mac/Linux and was blanking the whole of $function:tabexpansion2

Thanks again for writing this plugin, it's great to have z!
Joe.

@badmotorfinger badmotorfinger merged commit 2d2d59c into badmotorfinger:master Feb 20, 2020
@joejag
Copy link
Author

joejag commented Feb 20, 2020

Thanks for merging @vincpa!

@badmotorfinger
Copy link
Owner

badmotorfinger commented Feb 20, 2020

@joejag Thanks for working on this to make it compatible with *nix based systems :)

I've made a slight change in how the home directory is retrieved on windows and committed this to master.

Can you please verify all is working on Mac?

@joejag
Copy link
Author

joejag commented Feb 20, 2020

@vincpa Just tested with rev f8675c3 on master and all working good with your modification included on Linux (so safe to say Mac works as well)

@badmotorfinger
Copy link
Owner

badmotorfinger commented Feb 20, 2020

Great. I'll create an updated package in the next day or two for the PowerShell gallery so it's available to everyone.

Thanks again for this.

@joejag joejag deleted the cross-platform-edition branch Feb 20, 2020
@badmotorfinger
Copy link
Owner

badmotorfinger commented Feb 24, 2020

@joejag
Copy link
Author

joejag commented Feb 24, 2020

Installed and tested, all good. An aesthetically pleasing version number too. Thanks!

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 this pull request may close these issues.

None yet

2 participants