Skip to content

Commit

Permalink
Update CmdLine.lua (#1000)
Browse files Browse the repository at this point in the history
Very small cosmetic change to make positional arguments look better.

Previously, positional arguments would look like:
```
$ th my_script.lua --help
Usage: [options] <arg1><arg2>
-opt1 blah blah [default]
```
and now it should look like
```
$ th my_script.lua --help
Usage: [options] <arg1> <arg2>
-opt1 blah blah [default]
```
Very minorly cosmetic.
  • Loading branch information
Will Frey authored and soumith committed Apr 10, 2017
1 parent 7d9217c commit a9174b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CmdLine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ end
function CmdLine:help(arg)
io.write('Usage: ')
if arg then io.write(arg[0] .. ' ') end
io.write('[options] ')
io.write('[options]')
for i=1,#self.arguments do
io.write('<' .. strip(self.arguments[i].key) .. '>')
io.write(' <' .. strip(self.arguments[i].key) .. '>')
end
io.write('\n')

Expand Down

0 comments on commit a9174b5

Please sign in to comment.