How does passing an option value with spaces work in various option parsing software (in context of shell & #commandLineInterface)?

Expectation is that the option will have the entire string passed intact. This came up due to https://github.com/sahib/rmlint/issues/747 .

#Python "argparse" & #Perl "Getopt::Long" are what I personally care for; may check self; did not have to think about this before.

#optionParsing #softwareDev

Filespecs for flags can't have quotes (and therefore presumably spaces). Eg -o csv:FILENAME, -o json:FILENAME, or -o sh:FILENAME · Issue #747 · sahib/rmlint

For example: rmlint /mnt/btrfs/array1 ... -o csv'/home/bill/.local/rmlint/rmlint 2025-06-06 07-35-34.csv' -o json:"/tmp/rmlint $(date "+%Y%m%d-%H%M%S").json" (The "..." indicates some flags that ar...

GitHub