UnixCompleters icon indicating copy to clipboard operation
UnixCompleters copied to clipboard

Remove-PSUnixTabCompletion throws error about Scope parameter

Open sdwheeler opened this issue 3 years ago • 1 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

PS /home/sdwheeler> Remove-PSUnixTabCompletion
Remove-PSUnixTabCompletion: A parameter cannot be found that matches parameter name 'Scope'.
PS /home/sdwheeler> gmo

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Manifest   7.0.0.0               Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-Item, Clear-It…
Binary     0.5.0                 Microsoft.PowerShell.UnixTabComple… {Get-PSUnixTabCompletion, Import-PSUnixTabComplet…
Manifest   7.0.0.0               Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Ob…
Script     0.0                   OnStart
Script     2.2.5                 PSReadLine                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, …

Expected behavior

The module should be removed.

Actual behavior

The modules is not removed.

Error details

The `-Scope` parameter is not available for `Remove-Module` on non-Windows platforms.

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Linux 5.15.68.1-microsoft-standard-WSL2 #1 SMP Mon Sep 19 19:14:52 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


### Version

0.5.0

### Visuals

_No response_

sdwheeler avatar Oct 18 '22 21:10 sdwheeler

See https://github.com/PowerShell/UnixCompleters/blob/24dceabc0cbea8a2f5742063db81a910674e0e0a/Microsoft.PowerShell.UnixTabCompletion/Commands/RemovePSUnixUtilCompletersCommand.cs#L11

sdwheeler avatar Oct 18 '22 21:10 sdwheeler