Update ch12-05 PowerShell note

This commit is contained in:
Ryan Willis 2020-06-01 02:09:02 -07:00
parent 8f0c9a25a0
commit 855aabd099
2 changed files with 11 additions and 4 deletions

View File

@ -69,6 +69,7 @@ chXX
chYY
clippy
clippy's
cmdlet
coercions
combinator
ConcreteType

View File

@ -154,12 +154,18 @@ the word “to” in all lowercase:
Looks like that still works! Now, lets run the program with `CASE_INSENSITIVE`
set to `1` but with the same query `to`.
If youre using PowerShell, you will need to set the environment variable and
run the program in two commands rather than one:
If you're using PowerShell, you will need to set the environment
variable and run the program as separate commands:
```console
$ $env:CASE_INSENSITIVE=1
$ cargo run to poem.txt
PS> $Env:CASE_INSENSITIVE=1; cargo run to poem.txt
```
This will make `CASE_INSENSITIVE` persist for the remainder of your shell
session. It can be unset with the `Remove-Item` cmdlet:
```console
PS> Remove-Item Env:CASE_INSENSITIVE
```
We should get lines that contain “to” that might have uppercase letters: