mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2025-02-23 01:35:50 -06:00
add basic example to docs
This commit is contained in:
parent
0d2cbc51f9
commit
5020199fd1
1 changed files with 25 additions and 0 deletions
|
@ -1,5 +1,30 @@
|
|||
##[
|
||||
# HwylCli
|
||||
|
||||
## example program:
|
||||
|
||||
```nim
|
||||
import std/[strutils]
|
||||
import hywlterm/hwylcli
|
||||
|
||||
hwylCli:
|
||||
name "example"
|
||||
flags:
|
||||
count:
|
||||
? "# of times"
|
||||
- n
|
||||
input:
|
||||
? "content"
|
||||
- i
|
||||
run:
|
||||
echo (input & " ").repeat(count)
|
||||
```
|
||||
|
||||
```
|
||||
$ example -n 2 --input "testing"
|
||||
> testing testing
|
||||
```
|
||||
|
||||
]##
|
||||
|
||||
import std/[
|
||||
|
|
Loading…
Add table
Reference in a new issue