Fixed USAGE and readme that no longer reflected correct program invocation
This commit is contained in:
parent
a6906d1949
commit
51bd94646a
3 changed files with 7 additions and 6 deletions
|
@ -31,7 +31,7 @@ nimble install
|
||||||
|
|
||||||
Launching the interpreter is as simple as :
|
Launching the interpreter is as simple as :
|
||||||
```
|
```
|
||||||
nimfunge98 -f something.b98
|
nimfunge98 something.b98
|
||||||
```
|
```
|
||||||
|
|
||||||
The interpreter will then load and execute the specified Funge-98 program until the program normally terminates or is interrupted or killed.
|
The interpreter will then load and execute the specified Funge-98 program until the program normally terminates or is interrupted or killed.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
author = "Julien Dessaux"
|
author = "Julien Dessaux"
|
||||||
description = "A Funge-98 interpreter written in nim"
|
description = "A Funge-98 interpreter written in nim"
|
||||||
license = "EUPL-1.2"
|
license = "EUPL-1.2"
|
||||||
|
|
|
@ -8,10 +8,10 @@ import strformat
|
||||||
|
|
||||||
proc Usage(i: int = 0) =
|
proc Usage(i: int = 0) =
|
||||||
let filename = getAppFilename().extractFilename()
|
let filename = getAppFilename().extractFilename()
|
||||||
echo fmt"""Usage of {filename}:
|
echo fmt"""Usage: {filename} [FLAGS] filename
|
||||||
-f string b98 file to interpret
|
|
||||||
-h display this help message
|
FLAGS:
|
||||||
"""
|
-h display this help message"""
|
||||||
if i != 0:
|
if i != 0:
|
||||||
quit i
|
quit i
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ for kind, key, value in getOpt():
|
||||||
case key
|
case key
|
||||||
of "h":
|
of "h":
|
||||||
Usage()
|
Usage()
|
||||||
|
quit 0
|
||||||
else:
|
else:
|
||||||
echo "Unknown option: ", key
|
echo "Unknown option: ", key
|
||||||
Usage(1)
|
Usage(1)
|
||||||
|
|
Reference in a new issue