Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 6, 2021
1 parent b2474f1 commit 43697b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
)

func Edit(filename, session, client string) {
fmt.Println(session, client)
if session != "" && client != "" {
kakCommand := fmt.Sprintf("edit %s", filename)
Send(kakCommand, session, client)
Expand Down
7 changes: 4 additions & 3 deletions init.kak
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
define-command -override kaks-connect -params 1.. -command-completion %{
define-command -override kks-connect -params 1.. -command-completion %{
%arg{1} sh -c %{
export KAKS_SESSION=$1
export KAKS_CLIENT=$2
export EDITOR='kks edit'
export KKS_SESSION=$1
export KKS_CLIENT=$2
shift 3

[ $# = 0 ] && set "$SHELL"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func main() {

func getContext() *KakContext {
c := KakContext{
session: os.Getenv("KAKS_SESSION"),
client: os.Getenv("KAKS_CLIENT"),
session: os.Getenv("KKS_SESSION"),
client: os.Getenv("KKS_CLIENT"),
}
return &c
}
Expand Down

0 comments on commit 43697b1

Please sign in to comment.