mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-12-22 13:10:43 -06:00
fix: don't get session list if not running
This commit is contained in:
parent
f2ddcac75f
commit
947847459d
1 changed files with 6 additions and 4 deletions
|
@ -25,6 +25,8 @@ template cmd(tmux: Tmux, args: string) =
|
||||||
|
|
||||||
proc newTmux(): Tmux =
|
proc newTmux(): Tmux =
|
||||||
result.active = existsEnv("TMUX")
|
result.active = existsEnv("TMUX")
|
||||||
|
# check if server is active?
|
||||||
|
if execCmd("tmux run") == 0:
|
||||||
result.sessions = (
|
result.sessions = (
|
||||||
result.cmdGet "list-sessions -F '#S'"
|
result.cmdGet "list-sessions -F '#S'"
|
||||||
).strip().split("\n")
|
).strip().split("\n")
|
||||||
|
|
Loading…
Reference in a new issue