scopatz / xo

exofrills text editor
http://exofrills.org/
Do What The F*ck You Want To Public License
98 stars 16 forks source link

xo.main: allow specifying options like -v without needing a path #23

Closed catb0t closed 5 years ago

catb0t commented 5 years ago

also fixes a crash when no arguments or options were provided

ref https://github.com/scopatz/xo/pulls/13 and https://github.com/scopatz/xo/commit/46e0e91d6b99ea9c5e3d11a2856906e84d876b9a#r32121307

It may look weird but this is the intended way to get around ArgParse's simplicity. https://stackoverflow.com/a/17895206/4532996

scopatz commented 5 years ago

Thanks!