From 9c8a211b3c7c45757f0f8a890533f0a757e646a4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 19 Dec 2024 16:51:58 +0100 Subject: [PATCH] variables.md: environment variable defauly from a file --- cmdline/variables.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmdline/variables.md b/cmdline/variables.md index 29eba5b6fa..4a3fef0320 100644 --- a/cmdline/variables.md +++ b/cmdline/variables.md @@ -81,6 +81,12 @@ Instead, let's use `dummy` as a default value if `%USER` does not exist: --variable %USER=dummy \ --expand-url "https://example.com/api/{{USER}}/method" +Or get the default contents from a local file: + + curl \ + --variable %USER@file \ + --expand-url "https://example.com/api/{{USER}}/method" + ## Expand `--variable` The `--variable` option itself can also be expanded, which allows you to