On Sat, May 7, 2011 at 8:42 PM, Hisham <[email protected]> wrote: > scripts. On the other hand, however, consistent outputs and being > pipe-friendly is indeed the Unix way so maybe having a consistent > command-line flag for commands to produce script-friendly outputs is > the best approach.
I was trying to parse the output of 'git status' once and then discovered the --short flag - much easier! There is also a --porcelain (;)) flag which is guaranteed to produce stable output over versions. Personally, I prefer the direct API approach, but consistent and parseable output is definitely part of the tradition as you say. It extends to how paths should be presented. For instance, show --rock_dir currently gives paths with a mixture of \ and / on Windows. Not a problem for file opening but some command line tools are fussy. So then it's a question about whether to print the canonical representation always - that is, check the platform and if so, do the gsub first. steve d. _______________________________________________ Luarocks-developers mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers
