Skip to content

Commit f807c77

Browse files
committed
Update installation instructions in README.md
With PowerShellGet support for V3/V4, I updated the instructions to prefer using the PowerShellGallery over using PsGet to install from GitHub.
1 parent a61976e commit f807c77

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,27 @@ Ed Wilson (Scripting Guy) wrote a series on PSReadline, starting [here](http://b
2525

2626
##Installation
2727

28-
PSReadline builds are available in two places, GitHub and the PowerShell Gallery. The most recent builds will be published to the PowerShell Gallery until they are considered stable and then will be published on GitHub.
28+
There are multiple ways to install PSReadline.
2929

30-
To install from the PowerShell Gallery, you will need a recent build of [WMF5](http://go.microsoft.com/fwlink/?LinkId=398175). If you have WMF5 already, you can just run `Install-Module PSReadline`.
30+
### Install from PowerShellGallery (preferred)
3131

32-
To install the build from GitHub, you can install using [PsGet](http://psget.net) (very easy to install), and run `Install-Module PSReadline`. Note that Install-Module from PsGet is different than Install-Module with WMF5.
32+
You will need PowerShellGet. It is included in Windows 10 and [WMF5](http://go.microsoft.com/fwlink/?LinkId=398175). If you are using PowerShell V3 or V4, you will need to install [PowerShellGet](https://www.microsoft.com/en-us/download/details.aspx?id=49186).
3333

34-
Alternatively, download the file [PSReadline.zip](https://github.com/lzybkr/PSReadLine/releases/download/Latest/PSReadline.zip) and extract the contents into your `C:\Users\[User]\Documents\WindowsPowerShell\modules\PSReadline` folder. (You may have to create these directories if they don't exist.)
34+
After installing PowerShellGet, you can simply run `Install-Module PSReadline`.
3535

36-
Next edit your profile to import the module. There are two common profile files commonly used and the instructions are slightly different for each.
36+
If you are on Windows 10, PSReadline is already installed. At this time, you should not use Install-Module or Update-Module because there is not a newer version available for Windows 10.
37+
38+
### Install from GitHub (deprecated)
39+
40+
With the preview release of PowerShellGet for PowerShell V3/V4, I am deprecating downloads from GitHub. I don't intend to update releases on GitHub, and may remove the release entirely from GitHub at some point.
41+
42+
To install the build from GitHub, you can install using [PsGet](http://psget.net) (very easy to install), and run `Install-Module PSReadline`. Note that PsGet and PowerShellGet both have a Install-Module command, but they are very different despite having similar names and commands. PowerShellGet is implemented and supported by the PowerShell team at Microsoft, PsGet is a 3rd party tool that was a source of inspiration for PowerShellGet.
43+
44+
If you'd rather not use PsGet, you can just download the file [PSReadline.zip](https://github.com/lzybkr/PSReadLine/releases/download/Latest/PSReadline.zip) and extract the contents into your `C:\Users\[User]\Documents\WindowsPowerShell\modules\PSReadline` folder. (You may have to create these directories if they don't exist.)
45+
46+
### Post Installation
47+
48+
Edit your profile to import the module. This step is optional with PowerShell V5 and greater. There are two common profile files commonly used and the instructions are slightly different for each.
3749

3850
The file `C:\Users\[User]\Documents\WindowsPowerShell\profile.ps1` is used for all hosts (e.g. the ISE and powershell.exe). If you already have this file, then you should add the following:
3951

@@ -54,9 +66,11 @@ In either case, you can create the appropriate file if you don't already have on
5466

5567
##Upgrading
5668

57-
If you installed with `PSGet` or WMF5, you can run `Update-Module PSReadLine`.
69+
If you are on Windows 10, there is no upgrade available yet. When an upgrade is available, these instructions will be updated.
70+
71+
If you installed with `PSGet` or WMF5, you should exit from all instances of PowerShell that have loaded PSReadline, then run (from cmd.exe, or the Win+R run shortcut) `powershell -noprofile -command "Update-Module PSReadline"`.
5872

59-
If you've added it to your `$PROFILE`, when you run `Update-Module PSReadLine` you will get the following error
73+
If you get an error like:
6074

6175
```
6276
Remove-Item : Cannot remove item
@@ -65,9 +79,7 @@ C:\Users\{yourName}\Documents\WindowsPowerShell\Modules\PSReadLine\PSReadline.dl
6579
At C:\Users\{yourName}\Documents\WindowsPowerShell\Modules\PsGet\PsGet.psm1:1009 char:52
6680
```
6781

68-
1. Run `cmd.exe`
69-
2. `powershell -noprofile`
70-
3. `Update-Module PSReadLine`
82+
Then you didn't kill all the processes that loaded PSReadline.
7183

7284
##Usage
7385

0 commit comments

Comments
 (0)