mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-12-21 12:50:43 -06:00
Compare commits
2 commits
07dd5a5238
...
544b4f5c6f
Author | SHA1 | Date | |
---|---|---|---|
544b4f5c6f | |||
1d12d810f0 |
2 changed files with 10 additions and 10 deletions
|
@ -132,8 +132,8 @@ proc getProject(): Project =
|
|||
|
||||
func highlight(p: Project): string =
|
||||
if p.location == "": "green"
|
||||
elif p.open: "yellow"
|
||||
elif p.named: "bold cyan"
|
||||
elif p.open: "bold yellow"
|
||||
elif p.named: "cyan"
|
||||
else: "default"
|
||||
|
||||
proc addProject(b: var Buffer, project: Project, selected: bool) =
|
||||
|
|
16
src/tsm.nim
16
src/tsm.nim
|
@ -17,19 +17,19 @@ when isMainModule:
|
|||
import std/parseopt
|
||||
import hwylterm, hwylterm/cli
|
||||
|
||||
const tsmVersion {.strdefine.} = staticExec "git describe --tags --always HEAD --match 'v*'"
|
||||
proc help() =
|
||||
echo newHwylCli(
|
||||
const
|
||||
tsmVersion {.strdefine.} =
|
||||
staticExec "git describe --tags --always HEAD --match 'v*'"
|
||||
usage =
|
||||
"""tmux session manager
|
||||
|
||||
[bold]tsm[/] [[[faint]-h|-v|-o[/]]""",
|
||||
|
||||
flags = [
|
||||
[bold]tsm[/] [[[faint]-h|-v|-o[/]]"""
|
||||
flags = [
|
||||
("h","help","show this help"),
|
||||
("v","version", "print version"),
|
||||
("o","open", "only search open sessions")
|
||||
]
|
||||
)
|
||||
]
|
||||
proc help() = echo newHwylCli(usage, flags = flags)
|
||||
var open: bool
|
||||
var p = initOptParser(
|
||||
shortNoVal = {'h', 'v', 'o'},
|
||||
|
|
Loading…
Reference in a new issue