get raw command line

2020-09-26 Thread sflennik
Thanks for pointing out that the shell is responsible for quote handling. I was thinking there was of some general function like the windows GetCommandLine. I want to log the original string so I know what the user entered. I've decided that "echo $commandLineParams()" works for me. I need to s

get raw command line

2020-09-25 Thread cdunn2001
Result: $ ./foo 1 "2 3" 4 1 '2 3' 4 Run

get raw command line

2020-09-25 Thread cdunn2001
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`. import os import strutils import sug

get raw command line

2020-09-25 Thread sflennik
Is there a way to get the command line string before it's parsed? The commandLineParams proc almost works but it removes the quotes. import os import strutils echo commandLineParams().join(" ") $ bin/tests/t -l=asdf --filename="file name with spaces" -l=asdf --fi