mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
Merge pull request #11717 from llakala/patch-1
docs: clarify syntax for escaping dollar curlies
This commit is contained in:
commit
1ed166315c
1 changed files with 15 additions and 0 deletions
|
@ -150,6 +150,21 @@ These special characters are escaped as follows:
|
||||||
|
|
||||||
`''\` escapes any other character.
|
`''\` escapes any other character.
|
||||||
|
|
||||||
|
A "dollar-curly" (`${`) can be written as follows:
|
||||||
|
> **Example**
|
||||||
|
>
|
||||||
|
> ```nix
|
||||||
|
> ''
|
||||||
|
> echo ''${PATH}
|
||||||
|
> ''
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> "echo ${PATH}\n"
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> This differs from the syntax for escaping a dollar-curly within double quotes (`"\${"`). Be aware of which one is needed at a given moment.
|
||||||
|
|
||||||
A "double-dollar-curly" (`$${`) can be written literally.
|
A "double-dollar-curly" (`$${`) can be written literally.
|
||||||
|
|
||||||
> **Example**
|
> **Example**
|
||||||
|
|
Loading…
Reference in a new issue