Skip to content

Commit 2046536

Browse files
committed
Add to installation instructions
1 parent 6481efa commit 2046536

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,33 @@ The "out of box" experience is meant to be very familiar to PowerShell.exe users
2121

2222
Installation
2323
============
24+
First, you need to download the module. Using PsGet (http://psget.net, very easy to install), you can run:
2425

25-
1. Extract the `PSReadline.zip` into your `C:\Users\[User]\Documents\WindowsPowerShell\modules\PSReadline` folder. (You may have to create these directories if they don't exist)
26+
```
27+
psget PSReadline
28+
```
29+
30+
Alternatively, download the file https://github.com/lzybkr/PSReadLine/raw/master/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)
2631

27-
2. Edit your `C:\Users\[User]\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1` file (or create if not exists) and include the commands you want to load:
32+
Next edit your profile to import the module. There are two common profile files commonly used and the instructions are slightly different for each.
33+
34+
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:
35+
36+
```
37+
if ($host.Name -eq 'ConsoleHost')
38+
{
39+
Import-Module PSReadline
40+
}
41+
```
42+
43+
Alternatively, the file `C:\Users\[User]\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1` is for powershell.exe only. Using this file, you can simply add:
2844

2945
```
3046
Import-Module PSReadLine
31-
Set-PSReadlineOption -EditMode Emacs
3247
```
3348

49+
In either case, you can create the appropriate file if you don't already have one.
50+
3451
Usage
3552
=====
3653

0 commit comments

Comments
 (0)