These are chat archives for kbknapp/clap-rs

Mar 2018
Chris McDonald
Mar 14 2018 16:30
Is it possible to set up an argument that takes a value that if not present has a default, and if present without a value specified has a different default?
      help: Specifies the single-byte pattern to separate entries by. Default is newline.
      short: z
      long: terminator
          - [TERMINATOR, Null, "\\0"]
      default_value: "\\n"
I have this currently but this always yields "\n", even if passed with just -z