Skip to content

Conversation

@wking
Copy link
Contributor

@wking wking commented Jan 8, 2018

#GitHub uses Linguist for syntax highlighting. Linguist's shell language is for the language (e.g. the contents of a .sh file). The proper language for a shell session is ShellSession, although in this commit I've used the alias console.

The Cargo book uses mdBook, mdBook uses Highlight.js, and Highlight.js also supports console as an alias for shell sessions.

A handful of places where we had been using shell were just command output, not shell sessions (e.g. they lacked a prompt and command). In this commit, I've left those without a language label.

GitHub uses Linguist for syntax highlighting [1].  Linguist's 'shell'
language is for the *language* [2] (e.g. the contents of a `.sh`
file).  The proper language for a shell session is ShellSession [3],
although in this commit I've used the alias 'console' [4].

The Cargo book uses mdBook (src/doc/README.md), mdBook uses
Highlight.js [5], and Highlight.js also supports 'console' as an alias
for shell sessions [6].

A handful of places where we had been using 'shell' were just command
output, not shell sessions (e.g. they lacked a prompt and command).
In this commit, I've left those without a language label.

[1]: https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
[2]: https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L4208
[3]: https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L4249
[4]: https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L4255
[5]: https://rust-lang-nursery.github.io/mdBook/format/theme/syntax-highlighting.html#syntax-highlighting
[6]: https://github.com/isagalaev/highlight.js/blob/9.12.0/src/languages/shell.js#L10
@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Jan 8, 2018

📌 Commit bc489e2 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 9, 2018

⌛ Testing commit bc489e2 with merge 55b72dd...

bors added a commit that referenced this pull request Jan 9, 2018
doc: Replace 'shell' language labels (generally with 'console')

#GitHub [uses Linguist][1] for syntax highlighting.  Linguist's [`shell` language][2] is for the *language* (e.g. the contents of a `.sh` file).  The proper language for a shell session is [`ShellSession`][3], although in this commit I've used the [alias `console`][4].

The Cargo book [uses mdBook][4.5], mdBook [uses Highlight.js][5], and Highlight.js [also supports `console` as an alias for shell sessions][6].

A handful of places where we had been using `shell` were just command output, not shell sessions (e.g. they lacked a prompt and command).  In this commit, I've left those without a language label.

[1]: https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
[2]: https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L4208
[3]: https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L4249
[4]: https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L4255
[4.5]: https://github.com/rust-lang/cargo/tree/f60ece98c10aa3716d037524da4ee989e212fe19/src/doc#requirements
[5]: https://rust-lang-nursery.github.io/mdBook/format/theme/syntax-highlighting.html#syntax-highlighting
[6]: https://github.com/isagalaev/highlight.js/blob/9.12.0/src/languages/shell.js#L10
@bors
Copy link
Contributor

bors commented Jan 9, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 55b72dd to master...

@bors bors merged commit bc489e2 into rust-lang:master Jan 9, 2018
@ehuss ehuss added this to the 1.25.0 milestone Feb 6, 2022
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.

4 participants