probablykasper / cpc

Text calculator with support for units and conversion
https://crates.io/crates/cpc
MIT License
121 stars 14 forks source link

Improvement: Allow to not use quotes when invoking from the command line #31

Closed dchrzanowski closed 1 year ago

dchrzanowski commented 1 year ago

I find this package really helpful to operate from the CLI, however it would be really handy to just type cpc 2 + 2 instead of cpc '2 + 2'.

I created a bash script to do cpc "$*" this work just fine, but not for multiplication and I don't necessarily want to write a wrapper around this issue, especially if it could be provided out of the box.

Merely food for thought.

probablykasper commented 1 year ago

I've considered this before, but I didn't go with it because I personally found it to be a bad habit to use quotes, since for example cpc 1*2 would fail

dchrzanowski commented 1 year ago

Ahhh yes, sorry I forgot that an asterisk is a wildcard. Thank you for replying so quickly!