Closed yhql closed 7 years ago
I think this is OK
This needs more refinement. You can not just do
echo "+--+\n| |\n+--+" | svgbob -s
It should still work just like before if you remove the -s flag. I made the modification so that you can still do :
echo "+--+\n| |\n+--+" | svgbob
and for the cases where you don't want to use echo
:
svgbob -s "+--+\n| |\n+--+"
Ah ok, got it.
However there is an inconsistency though.
This works fine.
svgbob -s "+--+\n| |\n+--+"
but not
svgbob -s "hello"
neither
svgbob -s "----------+-----------"
This works though
svgbob -s "||||||"
I'm guessing there is a conflict with subcommands with the clap library.
Ah yes it seems clap is parsing the command in an unexpected way, but as it suggests in some case, you can do this :
svgbob -s -- "hello"
which works fine for me
Ok, I've changed the Readme and I will release a new svgbob_cli into crates.io shortly.
Should fix issue 15 (tested on Windows and linux)