nix icon indicating copy to clipboard operation
nix copied to clipboard

docs: clarify syntax for escaping dollar curlies

Open llakala opened this issue 1 year ago • 0 comments

Motivation

https://github.com/NixOS/nix/commit/3b388f6629938317d96ce72a1cfbee64372d8ce8 added some wonderful information on escaping dollar curlies within a multiline string. This is specifically helpful for writing shell scripts within something like writeShellScriptBin / writeShellApplication.

However, this information was only added to the String Interpolation page of the manual. While it is useful there, the String Literals page also could do with a mention of it. The String Literals page already mentions escaping dollar curlies within a double-quoted string ("\${"). Because the syntax for doing this within multiline strings differs, it should be mentioned on the same page. I think having this info in both locations is correct -- it's relevant for both sections.

I'm sure some of my wording could be rephrased, and the markdown could be tweaked to make the example and note more readable. Feel free to nitpick small details.

Priorities and Process

Add :+1: to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

llakala avatar Oct 18 '24 17:10 llakala