docopt / docopt.cpp

C++11 port of docopt
Boost Software License 1.0
1.04k stars 146 forks source link

Feature Request: Please support default that picks up value from environment variable #127

Open lenkite opened 4 years ago

lenkite commented 4 years ago

This is a popular convention now being followed by several CLI tools that pick up default values (like tokens or passwords) from environment variables if not specified at the command line. Maybe something like -t <token> api token [default:env:NAVAL_FATE_TOKEN]

But the author might have a better way to do this.

indianakernick commented 4 years ago

For something like this, you might want to request it upstream

AntonioCS commented 4 years ago

@Kerndog73 does the c++ version only have things that the python version has?

jaredgrubb commented 4 years ago

Yes, we've tried to keep it with the same features as the Python version (and by extension, all the other ports).