From 6c597939b7d77bd27c788cb3755befc4a3ce16cf 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 default from a file Closes #519 --- 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