israel-lugo / netcalc

Advanced network calculator and address planning helper
GNU General Public License v3.0
21 stars 0 forks source link

expr command should deal with missing whitespace around operators #1

Open israel-lugo opened 7 years ago

israel-lugo commented 7 years ago

It should be possible for the user to not use whitespace around the operators in the expr command. Right now, this is a syntax error:

$ ./netcalc.py expr 192.0.2.0/24 -192.0.2.0/25
usage: netcalc.py [-h] COMMAND ...
netcalc.py: error: unrecognized arguments: -192.0.2.0/25

This relates to the simple way in which we're parsing the command line. We'll need to be smarter than this.