I've just created a Python project that uses argparse for parsing arguments. But it seems that it does not support multi-line arguments. One can check the example/command-line.sh in the project, and will find it does not understand the following style
#!/bin/bash
../scripts_gen.py --template template.txt \
--save-to scripts \
--param "{'data':'datasets.txt', \
'lambda':[`echo 0.{0..9}|sed -E 's/\s+/,/g'`], \
'seed':[233,874]}" \
--format "{data}_lambda={lambda}_seed={seed}.sh" \
--delete
Note that this is legal in shell script: one can always write
$ ls -l \
> -f
in console or shell script file (no prompt in this case). So can I add support for this via argparse? Thank you.
--templatebut ignoring the rest. Then the shell later complains that it cannot find commands like--save-toetc..lsexample, so it's still a little weird.