🐛 only list/stop active projects

Close #8
This commit is contained in:
2021-12-19 17:00:40 -05:00
parent fc05aed4c0
commit 5825a1b2b4
5 changed files with 27 additions and 17 deletions

View File

@@ -33,11 +33,14 @@ var psCmd = &cobra.Command{
Use: "ps",
Short: "List currently running projects.",
Run: func(cmd *cobra.Command, args []string) {
t := tmux.Tmux{}
for _, project := range t.ListSessions() {
fmt.Println(project)
projects, err := tmux.ListActiveProjects()
if err != nil {
fmt.Println(err)
}
for _, project := range projects {
fmt.Println(project)
}
},
}