mirror of https://github.com/rust-lang/book
Update ch12-05 PowerShell note
This commit is contained in:
parent
8f0c9a25a0
commit
855aabd099
|
@ -69,6 +69,7 @@ chXX
|
|||
chYY
|
||||
clippy
|
||||
clippy's
|
||||
cmdlet
|
||||
coercions
|
||||
combinator
|
||||
ConcreteType
|
||||
|
|
|
@ -154,12 +154,18 @@ the word “to” in all lowercase:
|
|||
Looks like that still works! Now, let’s run the program with `CASE_INSENSITIVE`
|
||||
set to `1` but with the same query `to`.
|
||||
|
||||
If you’re 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:
|
||||
|
|
Loading…
Reference in New Issue