Skip to content

Commit

Permalink
util: moved FormatArgs to carapace-shlex
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jan 13, 2024
1 parent 3c3b1bc commit 85460de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 33 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/rsteube/carapace
go 1.15

require (
github.com/rsteube/carapace-shlex v0.1.1
github.com/rsteube/carapace-shlex v0.1.2
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
gopkg.in/yaml.v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/rsteube/carapace-shlex v0.1.1 h1:fRQEBBKyYKm4TXUabm4tzH904iFWSmXJl3UZhMfQNYU=
github.com/rsteube/carapace-shlex v0.1.1/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o=
github.com/rsteube/carapace-shlex v0.1.2 h1:ZKjhIfXoCkEnzensMglTaLbkNOaLkmM8SCRshpJKx6s=
github.com/rsteube/carapace-shlex v0.1.2/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
Expand Down
6 changes: 3 additions & 3 deletions pkg/execlog/execlog.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package execlog

import (
shlex "github.com/rsteube/carapace-shlex"
"github.com/rsteube/carapace/internal/log"
"github.com/rsteube/carapace/pkg/util"
"github.com/rsteube/carapace/third_party/golang.org/x/sys/execabs"
)

Expand All @@ -19,12 +19,12 @@ func Command(name string, arg ...string) *Cmd {
}

func (c *Cmd) Run() error {
log.LOG.Printf("executing %#v", util.FormatCmd(c.Args...))
log.LOG.Printf("executing %#v", shlex.Join(c.Args))
return c.Cmd.Run()
}

func (c *Cmd) Start() error {
log.LOG.Printf("executing %#v", util.FormatCmd(c.Args...))
log.LOG.Printf("executing %#v", shlex.Join(c.Args))
return c.Cmd.Start()
}

Expand Down
27 changes: 0 additions & 27 deletions pkg/util/format.go

This file was deleted.

0 comments on commit 85460de

Please sign in to comment.