mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-12-22 05:00:44 -06:00
Compare commits
No commits in common. "544b4f5c6fe8acd1a9529e5604ea2a9ced3161a4" and "07dd5a5238e0ddc67b24772be7b1f742693b4535" have entirely different histories.
544b4f5c6f
...
07dd5a5238
2 changed files with 10 additions and 10 deletions
|
@ -132,8 +132,8 @@ proc getProject(): Project =
|
||||||
|
|
||||||
func highlight(p: Project): string =
|
func highlight(p: Project): string =
|
||||||
if p.location == "": "green"
|
if p.location == "": "green"
|
||||||
elif p.open: "bold yellow"
|
elif p.open: "yellow"
|
||||||
elif p.named: "cyan"
|
elif p.named: "bold cyan"
|
||||||
else: "default"
|
else: "default"
|
||||||
|
|
||||||
proc addProject(b: var Buffer, project: Project, selected: bool) =
|
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 std/parseopt
|
||||||
import hwylterm, hwylterm/cli
|
import hwylterm, hwylterm/cli
|
||||||
|
|
||||||
const
|
const tsmVersion {.strdefine.} = staticExec "git describe --tags --always HEAD --match 'v*'"
|
||||||
tsmVersion {.strdefine.} =
|
proc help() =
|
||||||
staticExec "git describe --tags --always HEAD --match 'v*'"
|
echo newHwylCli(
|
||||||
usage =
|
|
||||||
"""tmux session manager
|
"""tmux session manager
|
||||||
|
|
||||||
[bold]tsm[/] [[[faint]-h|-v|-o[/]]"""
|
[bold]tsm[/] [[[faint]-h|-v|-o[/]]""",
|
||||||
flags = [
|
|
||||||
|
flags = [
|
||||||
("h","help","show this help"),
|
("h","help","show this help"),
|
||||||
("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)
|
)
|
||||||
var open: bool
|
var open: bool
|
||||||
var p = initOptParser(
|
var p = initOptParser(
|
||||||
shortNoVal = {'h', 'v', 'o'},
|
shortNoVal = {'h', 'v', 'o'},
|
||||||
|
|
Loading…
Reference in a new issue