You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that I used single quotes above, so my shell is not expanding the environment variable, Click does. How do I get Click to not expand it?
Answer
If you don't want Click to emulate (as best it can) unix expansion on Windows, pass windows_expand_args=False when calling the CLI.
Windows command line doesn't do any *, ~, or $ENV expansion. It also doesn't distinguish between double quotes and single quotes (where the later means "don't expand here"`). Click emulates the expansion so that the app behaves similarly on both platforms, but doesn't receive information about what quotes were used. So you can disable it and do your own expansion (or not) if you have other needs.
The text was updated successfully, but these errors were encountered:
Not sure where to put this. It is already documented in the api section under the Command->main, but it is probably a common question and the api docs are large.
Document this:
Question
I have a simple Click app like this:
When you pass an environment variable in the argument, it expands it:
Note that I used single quotes above, so my shell is not expanding the environment variable, Click does. How do I get Click to not expand it?
Answer
If you don't want Click to emulate (as best it can) unix expansion on Windows, pass windows_expand_args=False when calling the CLI.
Windows command line doesn't do any *, ~, or $ENV expansion. It also doesn't distinguish between double quotes and single quotes (where the later means "don't expand here"`). Click emulates the expansion so that the app behaves similarly on both platforms, but doesn't receive information about what quotes were used. So you can disable it and do your own expansion (or not) if you have other needs.
The text was updated successfully, but these errors were encountered: