Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 7, 2021
1 parent 16de758 commit 4275ec1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions TODO.md → TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- [x] kill cmd
- [ ] kill cmd
- [ ] detach newly started sessions from shell (setsid?)
- [ ] edit cmd neds line:col support
- [ ] edit cmd needs line:col support
- [ ] find solution to remove the timeout in Get
- grep cmd?
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module kks
module github.com/kkga/kks

go 1.17
16 changes: 5 additions & 11 deletions kks.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"flag"
"fmt"
"kks/cmd"
"github.com/kkga/kks/cmd"
"log"
"os"
"strings"
Expand All @@ -27,13 +27,9 @@ func main() {
sendCmd := flag.NewFlagSet("send", flag.ExitOnError)
attachCmd := flag.NewFlagSet("attach", flag.ExitOnError)
getCmd := flag.NewFlagSet("get", flag.ExitOnError)
// getValCmd := flag.NewFlagSet("get-val", flag.ExitOnError)
// getOptCmd := flag.NewFlagSet("get-opt", flag.ExitOnError)
// getRegCmd := flag.NewFlagSet("get-opt", flag.ExitOnError)
// getShCmd := flag.NewFlagSet("get-sh", flag.ExitOnError)
killCmd := flag.NewFlagSet("kill", flag.ExitOnError)

sessionCmds := []*flag.FlagSet{editCmd, sendCmd, getCmd, killCmd}
sessionCmds := []*flag.FlagSet{editCmd, sendCmd, attachCmd, getCmd, killCmd}
for _, cmd := range sessionCmds {
cmd.StringVar(&session, "s", "", "Kakoune session")
cmd.StringVar(&client, "c", "", "Kakoune client")
Expand Down Expand Up @@ -155,17 +151,15 @@ func printHelp() {
fmt.Println("Handy Kakoune companion.")
fmt.Println()
fmt.Println("USAGE")
fmt.Println(" kks <command> [args]")
fmt.Println(" kks <command> [-s <session>] [-c <client>] [<args>]")
fmt.Println()
fmt.Println("COMMANDS")
fmt.Println(" edit, e edit file")
fmt.Println(" list, l list sessions and clients")
fmt.Println(" send, s send command")
fmt.Println(" attach, a attach to session")
fmt.Println(" list, l list sessions and clients")
fmt.Println(" kill, k kill session")
fmt.Println(" get-val get value from client")
fmt.Println(" get-opt get option from client")
fmt.Println(" get-reg get register from client")
fmt.Println(" get get %{val}, %{opt} and friends")
fmt.Println(" env print env")
fmt.Println(" init print Kakoune definitions")
fmt.Println()
Expand Down

0 comments on commit 4275ec1

Please sign in to comment.