shyiko / jabba

(cross-platform) Java Version Manager
3k stars 195 forks source link

Add tab completion to jabba #589

Open leonard84 opened 4 years ago

leonard84 commented 4 years ago

I've created a small PowerShell module for jabba https://gist.github.com/leonard84/3828a2584e6a3cbc30a90c44c86b191e

It uses dedicated functions, e.g. Jabba-Use as this makes the auto completion easier.

JabbaExt-Demo

Here is the documentation on how to install a PowerShell module https://docs.microsoft.com/en-us/powershell/scripting/developer/module/installing-a-powershell-module?view=powershell-7

It must be put here $Home\Documents\WindowsPowerShell\Modules (%UserProfile%\Documents\WindowsPowerShell\Modules)

A well-formed module is a module that is stored in a directory that has the same name as the base name of at least one file in the module directory. If a module is not well-formed, Windows PowerShell does not recognize it as a module.

The "base name" of a file is the name without the file name extension. In a well-formed module, the name of the directory that contains the module files must match the base name of at least one file in the module.

In short it must be put in $Home\Documents\WindowsPowerShell\Modules\JabbaExt\JabbaExt.psm1

leonard84 commented 3 years ago

@willcohen since a release is in sight, WDYT about adding this?

willcohen commented 3 years ago

Hi there -- I'm not personally a Windows user and am unfamiliar with PowerShell, so I'm not sure where to go from here. A PR that incorporates this would be very useful!

leonard84 commented 3 years ago

I'm unsure how to best add this to the installation, basically the file must be put in $Home\Documents\WindowsPowerShell\Modules\JabbaExt\JabbaExt.psm1.

Should I just inline it into the install.ps1 script or would you add the module to the release so that it can be downloaded like the exe?