[refactoring] nimpretty

This commit is contained in:
Araq 2019-07-18 11:00:29 +02:00
commit 5b7273b4f8
2 changed files with 31 additions and 17 deletions

View file

@ -25,7 +25,7 @@ const
Usage:
nimpretty [options] file.nim
Options:
--output:file set the output file (default: overwrite the input file)
--out:file set the output file (default: overwrite the input file)
--indent:N[=0] set the number of spaces that is used for indentation
--indent:0 means autodetection (default behaviour)
--maxLineLen:N set the desired maximum line length (default: 80)
@ -79,7 +79,7 @@ proc main =
of "help", "h": writeHelp()
of "version", "v": writeVersion()
of "backup": backup = parseBool(val)
of "output", "o": outfile = val
of "output", "o", "out": outfile = val
of "indent": opt.indWidth = parseInt(val)
of "maxlinelen": opt.maxLineLen = parseInt(val)
else: writeHelp()