2

I'm using cmdargs and I need to pass several values after an optionnal argument.

I declared my test option to be a tuple of int :

data Options =
    Mode1   { input :: [FilePath]
            , test::(Int,Int)
            }

mode1 = 
  Mode1 { 
            input   = []  &= name "file" &= help "input file"    
          , test = (2,5)  &= explicit
        }

I can use my program with

./prog mode1 --test 5,6 --file "test_file.txt"

but I would like to have this syntax

./prog mode1 --test 5 6 --file "test_file.txt"

Is it possible to modify the field separator to use spaces or another character instead of a comma?

JeanJouX
  • 2,555
  • 1
  • 25
  • 37

0 Answers0