Skip to content

Commit 83bffa5

Browse files
authored
Merge pull request chubin#289 from Sea-n/patch-1
Fix syntax highlight in README
2 parents 42097e2 + 6692850 commit 83bffa5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,18 @@ has several useful features compared to querying the service directly with `curl
204204

205205
To install the client:
206206

207-
```
208-
PATH_DIR="$HOME/bin" # or another directory on your $PATH
209-
mkdir -p "$PATH_DIR"
210-
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
211-
chmod +x "$PATH_DIR/cht.sh"
207+
```bash
208+
PATH_DIR="$HOME/bin" # or another directory on your $PATH
209+
mkdir -p "$PATH_DIR"
210+
curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
211+
chmod +x "$PATH_DIR/cht.sh"
212212
```
213213

214214
or to install it globally (for all users):
215215

216-
```
217-
curl https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh
218-
chmod +x /usr/local/bin/cht.sh
216+
```bash
217+
curl https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh
218+
chmod +x /usr/local/bin/cht.sh
219219
```
220220

221221
Note: The package "rlwrap" is a required dependency to run in shell mode. Install this using `sudo apt install rlwrap`
@@ -303,21 +303,21 @@ Use it to specify query options that you would use with each query.
303303
For example, to switch syntax highlighting off create the file with the following
304304
content:
305305

306-
```
306+
```bash
307307
CHTSH_QUERY_OPTIONS="T"
308308
```
309309

310310
Or if you want to use a special syntax highlighting theme:
311311

312-
```
312+
```bash
313313
CHTSH_QUERY_OPTIONS="style=native"
314314
```
315315

316316
(`curl cht.sh/:styles-demo` to see all supported styles).
317317

318318
Other cht.sh configuration parameters:
319319

320-
```
320+
```bash
321321
CHTSH_CURL_OPTIONS="-A curl" # curl options used for cht.sh queries
322322
CHTSH_URL=https://cht.sh # URL of the cheat.sh server
323323
```
@@ -329,20 +329,20 @@ CHTSH_URL=https://cht.sh # URL of the cheat.sh server
329329

330330
To activate tab completion support for `cht.sh`, add the `:bash_completion` script to your `~/.bashrc`:
331331

332-
```
333-
$ curl https://cheat.sh/:bash_completion > ~/.bash.d/cht.sh
334-
$ . ~/.bash.d/cht.sh
335-
$ # and add . ~/.bash.d/cht.sh to ~/.bashrc
332+
```bash
333+
curl https://cheat.sh/:bash_completion > ~/.bash.d/cht.sh
334+
. ~/.bash.d/cht.sh
335+
# and add . ~/.bash.d/cht.sh to ~/.bashrc
336336
```
337337

338338
#### ZSH Tab completion
339339

340340
To activate tab completion support for `cht.sh`, add the `:zsh` script to the *fpath* in your `~/.zshrc`:
341341

342-
```
343-
$ curl https://cheat.sh/:zsh > ~/.zsh.d/_cht
344-
$ echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc
345-
$ # Open a new shell to load the plugin
342+
```zsh
343+
curl https://cheat.sh/:zsh > ~/.zsh.d/_cht
344+
echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc
345+
# Open a new shell to load the plugin
346346
```
347347

348348
----
@@ -536,7 +536,7 @@ In this example, several Vim plugins are used:
536536
* [scrooloose/syntastic](https://github.com/vim-syntastic/syntastic) — Syntax checking plugin
537537
* [cheat.sh-vim](https://github.com/dbeniamine/cheat.sh-vim) — Vim support
538538

539-
Syntastic shows warnings and errors (found by code analysis tools: `jshint`, `merlin`, `pylint`, `shellcheckt etc.),
539+
Syntastic shows warnings and errors (found by code analysis tools: `jshint`, `merlin`, `pylint`, `shellcheck` etc.),
540540
and `cheat.sh-vim` shows you explanations for the errors and warnings
541541
and answers on programming languages queries written in the editor.
542542

0 commit comments

Comments
 (0)