Skip to content

Commit 46db665

Browse files
authored
Merge pull request #1261 from Turbo87/remove-console-prefix
Remove automatic `$` prefix for `bash` and `console` code blocks
2 parents b7378b1 + 1d48713 commit 46db665

File tree

94 files changed

+124
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+124
-129
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Pages via GitHub Actions.
1212
To build the site locally:
1313

1414
```console
15-
> git clone https://github.com/rust-lang/blog.rust-lang.org
16-
> cd blog.rust-lang.org
17-
> cargo run
15+
$ git clone https://github.com/rust-lang/blog.rust-lang.org
16+
$ cd blog.rust-lang.org
17+
$ cargo run
1818
```
1919

2020
You could do it in release mode if you'd like, but it's pretty fast in debug.
@@ -23,13 +23,13 @@ From there, the generated HTML will be in a `site` directory.
2323
Open `site/index.html` in your web browser to view the site.
2424

2525
```console
26-
> firefox site/index.html
26+
$ firefox site/index.html
2727
```
2828

2929
You can also run a server, if you need to preview your changes on a different machine:
3030

3131
```console
32-
> cargo run -p serve
32+
$ cargo run -p serve
3333
Serving on: http://192.168.123.45:8000
3434
```
3535

posts/2015-10-29-Rust-1.4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ information about what it is
7979
changing.](https://github.com/rust-lang/cargo/pull/1931) For example:
8080

8181
```console
82-
cargo update
82+
$ cargo update
8383
Updating registry `https://github.com/rust-lang/crates.io-index`
8484
Updating libc v0.1.8 -> v0.1.10
8585
Updating memchr v0.1.3 -> v0.1.5

posts/2016-05-05-cargo-pillars.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Now that we've added the `time` crate, let's see what happens if we ask Cargo to
158158
build our package:
159159

160160
```console
161-
cargo build
161+
$ cargo build
162162
Compiling winapi v0.2.6
163163
Compiling libc v0.2.10
164164
Compiling winapi-build v0.1.1
@@ -174,14 +174,14 @@ up into smaller crates that do one thing and do it well**.
174174
Now that we successfully built our crate, what happens if we try to build it again?
175175

176176
```console
177-
cargo build
177+
$ cargo build
178178
```
179179

180180
Nothing happened at all. Why's that? We can always ask Cargo to give us more
181181
information through the `--verbose` flag, so let's do that:
182182

183183
```console
184-
cargo build --verbose
184+
$ cargo build --verbose
185185
Fresh libc v0.2.10
186186
Fresh winapi v0.2.6
187187
Fresh winapi-build v0.1.1
@@ -240,7 +240,7 @@ To do this, we check in our `Cargo.lock` and clone the repository on our new
240240
machine. Then, we run `cargo build` again.
241241

242242
```console
243-
cargo build
243+
$ cargo build
244244
Compiling libc v0.2.10
245245
Compiling winapi v0.2.6
246246
Compiling winapi-build v0.1.1
@@ -271,7 +271,7 @@ fn main() {
271271
To run the example, we ask Cargo to build and run it:
272272

273273
```console
274-
cargo run --example date
274+
$ cargo run --example date
275275
Compiling datetime v0.1.0 (file:///Users/ykatz/Code/datetime)
276276
Running `target/debug/examples/date`
277277
26 Apr 2016 :: 05:03:38
@@ -322,7 +322,7 @@ to our package:
322322
After using the crate in our library, let's run `cargo build` again:
323323

324324
```console
325-
cargo build
325+
$ cargo build
326326
Updating registry `https://github.com/rust-lang/crates.io-index`
327327
Downloading tz v0.2.1
328328
Downloading byteorder v0.5.1
@@ -386,7 +386,7 @@ fn bench_date(b: &mut Bencher) {
386386
If we then run `cargo bench`:
387387

388388
```console
389-
cargo bench
389+
$ cargo bench
390390
Compiling winapi v0.2.6
391391
Compiling libc v0.2.10
392392
Compiling byteorder v0.5.1
@@ -450,7 +450,7 @@ library for Unix-specific functionality.
450450
As before, when I run `cargo build`, Cargo *conservatively* adds `nix` and its dependencies:
451451

452452
```console
453-
cargo build
453+
$ cargo build
454454
Updating registry `https://github.com/rust-lang/crates.io-index`
455455
Downloading nix v0.5.0
456456
Downloading bitflags v0.4.0

posts/2016-05-13-rustup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ stable toolchain that targets the 64-bit, MSVC ABI.
145145
[abi]: https://www.rust-lang.org/downloads.html#win-foot
146146

147147
```console
148-
rustup default stable-x86_64-pc-windows-msvc
148+
$ rustup default stable-x86_64-pc-windows-msvc
149149
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
150150
info: downloading component 'rustc'
151151
info: downloading component 'rust-std'

posts/2016-08-10-Shape-of-errors-to-come.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Today, when you can call `--explain`, you pass an error code. The compiler then
9595
an extended message that goes into more detail about how errors of that form occur:
9696

9797
```console
98-
rustc --explain E0200
98+
$ rustc --explain E0200
9999

100100
Unsafe traits must have unsafe implementations. This error occurs when an
101101
implementation for an unsafe trait isn't marked as unsafe. This may be resolved

posts/2016-09-08-incremental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ time since implementation started towards the end of last year, all of the
2929
been done. You can give it a try in the nightly version of the compiler:
3030

3131
```console
32-
rustc -Zincremental=<path> ./main.rs
32+
$ rustc -Zincremental=<path> ./main.rs
3333
```
3434

3535
This will start the compiler in **incremental mode**, using whatever `<path>`

posts/2016-09-29-Rust-1.12.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ we showed above, at the start of the post? Here's an example of attempting to
7474
compile that code while passing the `--error-format=json` flag:
7575

7676
```bash
77-
rustc borrowck-assign-comp.rs --error-format=json
77+
$ rustc borrowck-assign-comp.rs --error-format=json
7878
{"message":"cannot assign to `p.x` because it is borrowed","level":"error","spans":[{"file_name":"borrowck-assign-comp.rs","byte_start":562,"byte_end":563,"line_start":15,"line_end":15,"column_start":14,"column_end":15,"is_primary":false,"text":[{"text":" let q = &p;","highlight_start":14,"highlight_end":15}],"label":"borrow of `p.x` occurs here","suggested_replacement":null,"expansion":null}],"label":"assignment to borrowed `p.x` occurs here","suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}
7979
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":null}
8080
```

posts/2016-12-22-Rust-1.14.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ small taste of how it works, once you have [emscripten] installed, compiling
4343
some Rust code to WebAssembly is as easy as:
4444

4545
```bash
46-
rustup target add wasm32-unknown-emscripten
46+
$ rustup target add wasm32-unknown-emscripten
4747
$ echo 'fn main() { println!("Hello, Emscripten!"); }' > hello.rs
4848
$ rustc --target=wasm32-unknown-emscripten hello.rs
4949
$ node hello.js

posts/2017-02-02-Rust-1.15.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.15 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the

posts/2017-02-09-Rust-1.15.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.15.1 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [download Rust][install] from the

posts/2017-03-16-Rust-1.16.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.16 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the
@@ -115,7 +115,7 @@ will live as long as `Name`, which is required for `Name` to be valid. Let's try
115115
code with Rust 1.15.1:
116116

117117
```bash
118-
rustc +1.15.1 foo.rs --crate-type=lib
118+
$ rustc +1.15.1 foo.rs --crate-type=lib
119119
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements
120120
--> .\foo.rs:10:5
121121
|
@@ -139,7 +139,7 @@ The compiler explains the issue, and gives a helpful suggestion. So let's try it
139139
the `'a`, and compile again:
140140
141141
```bash
142-
rustc +1.15.1 .\foo.rs --crate-type=lib
142+
$ rustc +1.15.1 .\foo.rs --crate-type=lib
143143
error[E0308]: method not compatible with trait
144144
--> .\foo.rs:10:5
145145
|
@@ -164,7 +164,7 @@ It still doesn't work. That help message was not actually helpful. It does sugge
164164
lifetime, this time on `Name`. If we do that...
165165
166166
```bash
167-
rustc +1.15.1 .\foo.rs --crate-type=lib
167+
$ rustc +1.15.1 .\foo.rs --crate-type=lib
168168
<snip>
169169
help: consider using an explicit lifetime parameter as shown: fn from_str(s: &'a str) -> Result<Name<'a>, ()>
170170
--> .\foo.rs:10:5

posts/2017-04-27-Rust-1.17.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.17 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the

posts/2017-06-08-Rust-1.18.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.18 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the

posts/2017-07-20-Rust-1.19.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.19 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the

posts/2017-08-31-Rust-1.20.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ is a systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.20 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the

posts/2017-10-12-Rust-1.21.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ is a systems programming language focused on safety, speed, and concurrency.
1111
If you have a previous version of Rust installed, getting Rust 1.21 is as easy as:
1212

1313
```bash
14-
rustup update stable
14+
$ rustup update stable
1515
```
1616

1717
If you don't have it already, you can [get `rustup`][install] from the

posts/2017-11-22-Rust-1.22.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
2020
1.22.1 is as easy as:
2121

2222
```bash
23-
rustup update stable
23+
$ rustup update stable
2424
```
2525

2626
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-01-04-Rust-1.23.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.23.0 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-02-15-Rust-1.24.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.24.0 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the
@@ -33,7 +33,7 @@ of "standard style." With this release, we're happy to announce that a *preview*
3333
can be used with 1.24 stable. To give it a try, do this:
3434

3535
```bash
36-
rustup component add rustfmt-preview
36+
$ rustup component add rustfmt-preview
3737
```
3838

3939
There are two important aspects here: first, you're using `rustup component

posts/2018-03-01-Rust-1.24.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.24.1 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-03-29-Rust-1.25.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.25.0 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-05-10-Rust-1.26.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.26.0 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-05-29-Rust-1.26.1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.26.1 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the
@@ -124,7 +124,7 @@ This was unfortunately fixed too late to make it into 1.26 stable, so we added
124124
the patch for 1.26.1 to permit users to install Rust on these platforms.
125125

126126
```console
127-
rustup update
127+
$ rustup update
128128
info: syncing channel updates for 'stable-x86_64-unknown-freebsd'
129129
info: latest update on 2018-05-10, rust version 1.26.0 (a77568041 2018-05-07)
130130
error: component 'rust-docs' for 'x86_64-unknown-freebsd' is unavailable for download

posts/2018-06-05-Rust-1.26.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.26.2 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-06-21-Rust-1.27.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.27.0 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-07-10-Rust-1.27.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.27.1 is as easy as:
1313

1414
```console
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-07-20-Rust-1.27.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.27.2 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

posts/2018-08-02-Rust-1.28.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1212
1.28.0 is as easy as:
1313

1414
```bash
15-
rustup update stable
15+
$ rustup update stable
1616
```
1717

1818
If you don't have it already, you can [get `rustup`][install] from the

0 commit comments

Comments
 (0)