It doesn't exactly "remove" the quotes. The shell interprets them and stores 
into command-line arguments without them. A C program works the same way.

I think you want `shellQuote`.

<https://nim-lang.org/docs/os.html#quoteShell%2Cstring>
    
    
    import os
    import strutils
    import sugar
    #echo commandLineParams().join(" ")
    proc main() =
      let cl = sugar.collect(newSeq):
        for p in commandLineParams():
          os.quoteShell(p)
      
      echo cl.join(" ")
    
    main()
    
    
    Run

Reply via email to