add syntax highlighting to code blocks
parent
6d64481bb8
commit
e5a7bbe845
@ -13,15 +13,19 @@ Variables name should not clobber command names, such as `dir`, `pwd`
|
|||||||
|
|
||||||
Braces should be on the same line as the function name:
|
Braces should be on the same line as the function name:
|
||||||
|
|
||||||
|
```bash
|
||||||
function helpful() {
|
function helpful() {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Private or utility functions should be prefixed with an underscore:
|
Private or utility functions should be prefixed with an underscore:
|
||||||
|
|
||||||
|
```bash
|
||||||
function _helper-util() {
|
function _helper-util() {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## General
|
## General
|
||||||
@ -30,8 +34,10 @@ Indenting should be done with 2 spaces.
|
|||||||
|
|
||||||
When possible, use environment variables instead of forking a command.
|
When possible, use environment variables instead of forking a command.
|
||||||
|
|
||||||
|
```bash
|
||||||
$(pwd) # don't use, forks a new process
|
$(pwd) # don't use, forks a new process
|
||||||
$PWD # do use
|
$PWD # do use
|
||||||
|
```
|
||||||
|
|
||||||
`if-then` statements should be on one line:
|
`if-then` statements should be on one line:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user