fix gitignores

This commit is contained in:
Daylin Morgan 2025-01-23 17:29:52 -06:00
parent 49b8e94bb7
commit 50d0ee5a3b
Signed by: daylin
GPG key ID: 950D13E9719334AD
8 changed files with 74 additions and 7 deletions

9
tests/.gitignore vendored
View file

@ -1,4 +1,7 @@
# Ignore all files without extensions in any directory
* *
!*.nim !*/
!*.nims !*.*
!cli/
# Don't ignore .gitignore file
!.gitignore

View file

@ -1,4 +0,0 @@
*
!refs/*
!*.nim
!*.nims

View file

@ -0,0 +1 @@
switch("path", "$projectDir/../../../src")

View file

@ -0,0 +1,17 @@
import std/[strformat]
import hwylterm, hwylterm/hwylcli
type
Color = enum
red, blue, green
# TODO: color should be a required flag by default?
hwylCli:
name "enumFlag"
flags:
color:
T Color
run:
echo fmt"{color=}"
assert args.len == 0

View file

@ -0,0 +1,12 @@
import std/[strformat]
import hwylterm, hwylterm/hwylcli
hwylCli:
name "positionals"
args:
first seq[string]
second string
third string
run:
echo fmt"{first=}, {second=}, {third=}"
echo fmt"{args=}"

View file

@ -0,0 +1,12 @@
import std/[strformat]
import hwylterm, hwylterm/hwylcli
hwylCli:
name "posLast"
args:
first string
second string
third seq[string]
run:
echo fmt"{first=}, {second=}, {third=}"
assert args.len == 0

View file

@ -0,0 +1,13 @@
import std/[strformat]
import hwylterm, hwylterm/hwylcli
hwylCli:
name "posLast"
settings: ExactArgs
args:
first string
second string
third seq[string]
run:
echo fmt"{first=}, {second=}, {third=}"
assert args.len == 0

View file

@ -0,0 +1,13 @@
import std/[strformat]
import hwylterm, hwylterm/hwylcli
hwylCli:
name "positionals"
settings: ExactArgs
args:
first int
second string
third string
run:
echo fmt"{first=}, {second=}, {third=}"
assert args.len == 0