Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ch12-05 PowerShell note #2348

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

ryan-willis
Copy link
Contributor

@ryan-willis ryan-willis commented Jun 1, 2020

Simplifies and slightly clarifies the PowerShell commands in Chapter 12.5.
Also made it a blockquote to make it easier to skip if it doesn't apply to the reader.
(EDIT: added "cmdlet" to the dictionary for https://docs.microsoft.com/en-us/powershell/scripting/developer/cmdlet/cmdlet-overview?view=powershell-7)

PS Command:

$Env:CASE_INSENSITIVE=1; cargo run to poem.txt

Output:

    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target\debug\minigrep.exe to poem.txt`
Are you nobody, too?
How dreary to be somebody!
To tell your name the livelong day
To an admiring bog!

Then:

Remove-Item Env:CASE_INSENSITIVE; cargo run to poem.txt

Output:

    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target\debug\minigrep.exe to poem.txt`
Are you nobody, too?
How dreary to be somebody!

Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I am a newbie at powershell, and always just opened a new shell, heh.

Could you also remove the blockquote please? When we turn the book into printed form, we won't want it, and so this is a well-intentoned change but not one that I can accept.

```
> Note: If you're using PowerShell, you will need to set the environment
> variable and run the program as separate commands:
> ```text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add newlines above and below both of these codeblocks, so that the style is similar to what's removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@ryan-willis ryan-willis requested a review from steveklabnik June 1, 2020 21:23
@ryan-willis ryan-willis force-pushed the ch12-05-powershell-note branch from 2c7d621 to f869159 Compare June 3, 2020 00:02
@ryan-willis ryan-willis force-pushed the ch12-05-powershell-note branch from f869159 to 855aabd Compare June 3, 2020 00:04
@ryan-willis
Copy link
Contributor Author

@steveklabnik rebased (squashed) and resolved conflicts

Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@steveklabnik
Copy link
Member

(I can’t merge from the app; will do so when I get back to a computer.)

@steveklabnik steveklabnik merged commit 5255ce8 into rust-lang:master Jun 3, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jun 8, 2020
Update books

## nomicon

3 commits in d1517d4e3f29264c5c67bce2658516bb5202c800..bfe1ab96d717d1dda50e499b360f2e2f57e1750a
2020-05-12 13:47:00 -0400 to 2020-06-05 13:19:42 -0400
- Clarify that str data must still be initialized
- Remove language-level UB for non-UTF-8 str
- fix Nomicon transmute UB

## reference

5 commits in becdca9477c9eafa96a4eea5156fe7a2730d9dd2..5d40ba5c2515caffa7790cda621239dc21ef5a72
2020-05-21 21:08:02 +0100 to 2020-06-06 20:25:36 -0700
- Add some links to Disambiguating Function Calls. (rust-lang/reference#829)
- change bash to sh as shell code blocks language indentifier (rust-lang/reference#827)
- Fix sentence mistake in array-expr.md (rust-lang/reference#826)
- removed the word "Second" form the beginning of the 2nd list item and  labelled it as `2` (rust-lang/reference#822)
- Update fn-like proc-macro invocation restrictions. (rust-lang/reference#816)

## book

14 commits in e8a4714a9d8a6136a59b8e63544e149683876e36..30cd9dfe71c446de63826bb4472627af45acc9db
2020-05-25 10:29:27 -0500 to 2020-06-07 23:07:19 -0500
- Unnecessarily long type name in Ch 13 (rust-lang/book#2362)
- Tweak example in chapter 10 (rust-lang/book#2363)
- Mention that to_lowercase isn't perfect (rust-lang/book#2364)
- fix typo in CONTRIBUTING.md (rust-lang/book#2360)
- Link German translation in appendix F (rust-lang/book#2347)
- Updates wording on Box example (rust-lang/book#2332)
- fix: match 15-24 with 15-18 (rust-lang/book#2324)
- Reword ch01-03 recap paragraph (rust-lang/book#2305)
- Remove some confusing wording. (rust-lang/book#2358)
- Clarify some wording a bit (rust-lang/book#2357)
- Update ch12-05 PowerShell note (rust-lang/book#2348)
- text -> console (rust-lang/book#2352)
- Improve wording around drop (rust-lang/book#2350)
- Make some statements about crates more correct (rust-lang/book#2349)

## edition-guide

1 commits in 0a8ab5046829733eb03df0738c4fafaa9b36b348..82bec5877c77cfad530ca11095db4456d757f668
2020-05-18 08:34:23 -0500 to 2020-06-03 08:56:02 -0500
- Add stuff for Rust 1.33 (rust-lang/edition-guide#214)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants