Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-254

"test" gets parsed as test, quotes die :-(

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.3
    • None
    • None
    • None

    Description

      def cli = new CliBuilder()
      cli.with {
        f longOpt:'json-filter','jq expression', args: 1
      }
      def vals = ['test', 't"es"t',
                  "'test", "test'", "'test'",
                  '"test', 'test"', '"test"']
      vals.each {
        def opt = cli.parse(['-f', it])
        assert opt.f == it
      }
      

      It fails on last entry: "test".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              neopaf Alexander Petrossian (PAF)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m