R. David Murray added the comment:
I'm not sure this is a good idea. $BAR is supported on the command line
because your shell supports it. To support it in files, argparse would have to
(re)implement shell parsing, and while we do have a parser in the stdlib that
can do some of this (shlex),
New submission from Nat Hillard:
When using the argparse argument fromfile_prefix_chars to obtain command line
arguments from a file, it is not possible to make use of bash environment
variables within this file.
Ideally one would be able to `export BAR='/Users/x/Desktop/bar'`, and then give