Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Expand --variable

The --variable option itself can also be expanded, which allows you to assign variables to the contents of other variables.

curl \
    --expand-variable var1={{var2}} \
    --expand-variable fullname="Mrs {{first}} {{last}}" \
    --expand-variable source@{{filename}}

Or done in a config file:

# Curl config file

variable host=example

expand-variable url=https://{{host}}.com

expand-variable source@{{filename}}