How to install powershell with autocompletion?

there is an AUR powershell version and installation is easy.

If I’m correct, if I want autocompletion then I have to install PSReadLine module
It is here:

I’ve tried the installation instruction, but it didn’t work.
Powershell modules are located in /opt/… directory, but I don’t know how to put modules there.

There are multiple ways to install PSReadLine.

Which method did you follow and what was the result?

Just curious, why would you want to use Microsoft Powershell on GNU / Linux? What can you do with it you can’t with BASH or ZSH and their many plugin options?

I tried this:

Install from PowerShellGallery (preferred)

You will need the 1.6.0 or a higher version of PowerShellGet to install the latest prerelease version of PSReadLine.

Windows PowerShell 5.1 ships an older version of PowerShellGet which doesn’t support installing prerelease modules, so Windows PowerShell users need to install the latest PowerShellGet (if not yet) by running the following commands from an elevated Windows PowerShell session:

Install-Module -Name PowerShellGet -Force Exit

After installing PowerShellGet, you can get the latest prerelease version of PSReadLine by running

Install-Module PSReadLine -AllowPrerelease -Force

If you only want to get the latest stable version, run:

Install-Module PSReadLine

At the end I’ve found the “solution”
I downloaded PSReadLine manually from here:

After unzipping I was able to install it with:
install-module /path/to/module.psd1

But I have to type it every time after launching pwsh

I tried to copy files from the archive to:
/opt/microsoft/powershell/7/Modules
And then load module by install-module psreadline ← didn’t work

Ther error message is always the same:

install-module: The term 'install-module' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

And when I list modules I get:

PS /home/jm> get-module -listavailable

    Directory: /opt/microsoft/powershell/7/Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Manifest   7.0.0.0               Microsoft.PowerShell.Host           Core      {Start-Transcript, Stop-Transcript}
Manifest   7.0.0.0               Microsoft.PowerShell.Management     Core      {Add-Content, Clear-Content, Clear-Item…
Manifest   7.0.0.0               Microsoft.PowerShell.Security       Core      {Get-Credential, Get-ExecutionPolicy, S…
Manifest   7.0.0.0               Microsoft.PowerShell.Utility        Core      {Export-Alias, Get-Alias, Import-Alias,…