Moeologist / scoop-completion

scoop tab completion, work with powershell
MIT License
173 stars 12 forks source link

Installation method for powershell and pwsh differ #7

Closed matthewbegun closed 5 years ago

matthewbegun commented 5 years ago

The listed methods for installing in (windows) powershell and (core) pwsh differ and produce errors when used by each other.

If we share the PowerShell_profile.ps1 file for both versions this is an issue.

Can replace both methods with the following code which works either way, and doesn't produce any errors in either version:

# enable auto-load, create profile if not exist
$env:SCOOP = "$env:USERPROFILE\scoop"; Add-Content -Path $Profile -Value "`nImport-Module $env:SCOOP/modules/scoop-completion"
Moeologist commented 5 years ago

The method for PS Core seems to be well in Windows PS. On the contrary, it is not. Anyway I modified README.