command line parametr with whitespace

2023-02-04 Thread cblake
Oh, yeah, FWIW, @domogled's apparent intent can be gotten with let x = r--title:new title with whitespace # ^start with " can skip 1^ Run on both Linux & Windows. Not great, but maybe not totally useless. There are "better" external thin

command line parametr with whitespace

2023-02-04 Thread SolitudeSF
wonder, what is the point of having in stdlib stuff that is completely broken.

command line parametr with whitespace

2023-02-04 Thread shirleyquirk
There is a bug in `parseCmdLine` when not on windows. [this line](https://github.com/nim-lang/Nim/blob/e0328e28ee6b3fbfea812ffc2ce435ff76ccbc5a/lib/pure/os.nim#L2830) should probably be: while i < c.len and c[i] > ' ' and not (c[i] in

command line parametr with whitespace

2023-02-04 Thread cblake
Possibly helpful. The impl on Windows & Unix differs (big `when` and documented differences in `lib/std/cmdline.nim`). On Linux one sees (instead of what @enthus1ast describes): import os let x = r"""--title "new title with whitespace # ^space needed

command line parametr with whitespace

2023-02-04 Thread enthus1ast
I just tried the code you sent (on a wi does 10)

command line parametr with whitespace

2023-02-04 Thread domogled
thanks, it seems to depend on the system settings Im use Linux Manjaro (Mabox), fish shell (when I use bash, the result is the same). What do you use? thanks

command line parametr with whitespace

2023-02-02 Thread enthus1ast
for quickly adding nice parameter support to my applications, i tend to use cligen

command line parametr with whitespace

2023-02-02 Thread enthus1ast
this actually works for me: import os echo parseCmdLine("""---title:"new title with whitespace" """) Run output: @["---title:new title with whitespace"] Run i'm currently on nim 1.6.10 [Windows: amd64]

command line parametr with whitespace

2023-02-02 Thread domogled
Hello, why I add parameter in command line with whiutespace? echo parseCmdLine("""---title:"new title with whitespace" """) Run parse: `@["---title:new", "title", "with", "whitespace\""]` Module works similarly: opt cmdLongOption ---title:new opt cm