docs: update

This commit is contained in:
Dylan Araps
2019-09-19 12:01:15 +03:00
parent 9985f71c92
commit fe6c6a7677

View File

@@ -49,6 +49,8 @@ A collection of pure POSIX `sh` alternatives to external processes
* [TRAPS](#traps)
* [Do something on script exit](#do-something-on-script-exit)
* [Ignore terminal interrupt (CTRL+C, SIGINT)](#ignore-terminal-interrupt-ctrlc-sigint)
* [OBSOLETE SYNTAX](#obsolete-syntax)
* [Command Substitution](#command-substitution)
<!-- vim-markdown-toc -->
@@ -546,3 +548,20 @@ trap clean_up EXIT
```shell
trap '' INT
```
# OBSOLETE SYNTAX
## Command Substitution
Use `$()` instead of `` ` ` ``.
```shell
# Right.
var="$(command)"
# Wrong.
var=`command`
# $() can easily be nested whereas `` cannot.
var="$(command "$(command)")"
```