mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-11-16 09:18:32 -06:00
chore: upgrade hwylterm
This commit is contained in:
parent
544b4f5c6f
commit
eeb6bca377
3 changed files with 40 additions and 40 deletions
|
@ -3,12 +3,12 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"hwylterm": {
|
"hwylterm": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"vcsRevision": "337083afe13bf0f1bd024b870c2174a901e8ce06",
|
"vcsRevision": "b6202f4f51edadd041d2b5f2aed1d75abcd4ee51",
|
||||||
"url": "https://github.com/daylinmorgan/hwylterm",
|
"url": "https://github.com/daylinmorgan/hwylterm",
|
||||||
"downloadMethod": "git",
|
"downloadMethod": "git",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"checksums": {
|
"checksums": {
|
||||||
"sha1": "a995a81f5e4af2991c79ed04b02f17d47dd509e0"
|
"sha1": "eb38b434419ec70f080f79b7826c3c3989a2c74a"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"illwill": {
|
"illwill": {
|
||||||
|
|
12
src/tsm.nim
12
src/tsm.nim
|
@ -13,9 +13,9 @@ proc tsm(open: bool = false) =
|
||||||
tmux.attach project.name
|
tmux.attach project.name
|
||||||
|
|
||||||
|
|
||||||
when isMainModule:
|
# when isMainModule:
|
||||||
import std/parseopt
|
# import std/parseopt
|
||||||
import hwylterm, hwylterm/cli
|
import hwylterm, hwylterm/hwylcli
|
||||||
|
|
||||||
const
|
const
|
||||||
tsmVersion {.strdefine.} =
|
tsmVersion {.strdefine.} =
|
||||||
|
@ -29,7 +29,7 @@ when isMainModule:
|
||||||
("v","version", "print version"),
|
("v","version", "print version"),
|
||||||
("o","open", "only search open sessions")
|
("o","open", "only search open sessions")
|
||||||
]
|
]
|
||||||
proc help() = echo newHwylCli(usage, flags = flags)
|
proc help() = echo newHwylCliHelp(usage = usage, flags = flags)
|
||||||
var open: bool
|
var open: bool
|
||||||
var p = initOptParser(
|
var p = initOptParser(
|
||||||
shortNoVal = {'h', 'v', 'o'},
|
shortNoVal = {'h', 'v', 'o'},
|
||||||
|
@ -37,8 +37,8 @@ when isMainModule:
|
||||||
)
|
)
|
||||||
for kind, key, val in p.getOpt():
|
for kind, key, val in p.getOpt():
|
||||||
case kind:
|
case kind:
|
||||||
of cmdEnd:
|
of cmdError: assert false
|
||||||
break
|
of cmdEnd: assert false
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
echo bb"[red]Error[/]: unexpected positional argument ", bbfmt"[bold]{key}[/]"
|
echo bb"[red]Error[/]: unexpected positional argument ", bbfmt"[bold]{key}[/]"
|
||||||
of cmdShortOption, cmdLongOption:
|
of cmdShortOption, cmdLongOption:
|
||||||
|
|
|
@ -12,6 +12,6 @@ binDir = "bin"
|
||||||
|
|
||||||
requires "nim >= 2.0.0"
|
requires "nim >= 2.0.0"
|
||||||
requires "illwill >= 0.4.1"
|
requires "illwill >= 0.4.1"
|
||||||
requires "https://github.com/daylinmorgan/hwylterm#HEAD"
|
requires "https://github.com/daylinmorgan/hwylterm#b6202f4"
|
||||||
requires "https://github.com/usu-dev/usu-nim"
|
requires "https://github.com/usu-dev/usu-nim"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue