]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
variable.md: mention --expand-variable for variables to variables
authorDaniel Stenberg <daniel@haxx.se>
Sun, 15 Dec 2024 22:07:57 +0000 (23:07 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 16 Dec 2024 07:17:22 +0000 (08:17 +0100)
To assign a variable using contents from another variable.

Closes #15752

docs/cmdline-opts/variable.md

index d9a008ea874312807fb7339a6b123c690df3d027..9ecc3f0e7147d60c12c068d409ac56a67b814bd4 100644 (file)
@@ -36,6 +36,12 @@ the environment variable is not set, use --variable %name=content or
 --variable %name@content. Note that on some systems - but not all -
 environment variables are case insensitive.
 
+To assign a variable using contents from another variable, use
+--expand-variable. Like for example assigning a new variable using contents
+from two other:
+
+    curl --expand-variable "user={{firstname}} {{lastname}}"
+
 When expanding variables, curl supports a set of functions that can make the
 variable contents more convenient to use. You apply a function to a variable
 expansion by adding a colon and then list the desired functions in a