@@ -204,18 +204,18 @@ has several useful features compared to querying the service directly with `curl
204204
205205To 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
214214or 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
221221Note: 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.
303303For example, to switch syntax highlighting off create the file with the following
304304content:
305305
306- ```
306+ ``` bash
307307CHTSH_QUERY_OPTIONS=" T"
308308```
309309
310310Or if you want to use a special syntax highlighting theme:
311311
312- ```
312+ ``` bash
313313CHTSH_QUERY_OPTIONS=" style=native"
314314```
315315
316316(` curl cht.sh/:styles-demo ` to see all supported styles).
317317
318318Other cht.sh configuration parameters:
319319
320- ```
320+ ``` bash
321321CHTSH_CURL_OPTIONS=" -A curl" # curl options used for cht.sh queries
322322CHTSH_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
330330To 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
340340To 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 ` , ` shellcheckt ` etc.),
540540and ` cheat.sh-vim ` shows you explanations for the errors and warnings
541541and answers on programming languages queries written in the editor.
542542
0 commit comments