Skip to content

Commit f767555

Browse files
committed
Simplify and remove -Update switch
1 parent 6734591 commit f767555

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Install-Module -Name posh-cli -Repository PSGallery
1111
Install-TabCompletion
1212
```
1313

14+
Install the `posh-cli` module and calling `Install-TabCompletion` installs required modules that tab completion to the CLIs available on your system. It also imports the module so that you can start using it and adds such a call to your PowerShell $PROFILE as well.
15+
16+
You can call the `Install-TabCompletion` cmdlet also to update those modules at a later time. The list of modules is stored remotely in the [cli-modules-v1.json](./source/cli-modules-v1.json) file, therefore you should not need to update `posh-cli` itself unless new capabilities become available that you want to use. Only non-breaking changes will be made to this JSON file.
17+
1418
## Overview
1519

1620
The module analyses the installed CLIs and installs modules from the PSGallery that help with the tab completion. It automatically executes and adds the necessary calls for initialisation of the installed tab completion modules to your `$PROFILE`.

source/posh-cli/posh-cli.psd1

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'posh-cli.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.2'
15+
ModuleVersion = '0.3'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = @('Core', 'Desktop')

source/posh-cli/posh-cli.psm1

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
function Install-TabCompletion {
22
[CmdletBinding(SupportsShouldProcess)]
3-
param(
4-
# Updates already installed modules
5-
[switch]
6-
$Update
7-
)
3+
param()
84

95
# Get available CLIs
106
$applications = (Get-Command -CommandType Application) | ForEach-Object {
@@ -33,9 +29,6 @@ function Install-TabCompletion {
3329
if (Get-Module -Name $moduleName -ListAvailable) {
3430
Write-Verbose "Module '$moduleName' is already installed, skipping"
3531
$moduleAlreadyInstalled = $true
36-
if (-not $Update.IsPresent) {
37-
continue
38-
}
3932
}
4033
if ($PSCmdlet.ShouldProcess("Installing module '$moduleName' from PSGallery")) {
4134
Write-Verbose "Installing module '$moduleName' from PSGallery with Scope 'CurrentUser'" -Verbose

0 commit comments

Comments
 (0)