Skip to content

Commit

Permalink
Merge pull request #1801 from rsteube/go-tool-pack-contents
Browse files Browse the repository at this point in the history
go-tool-pack: fix content completion
  • Loading branch information
rsteube authored Aug 12, 2023
2 parents d80cefe + 9ee8884 commit b4ff466
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions completers/go-tool-pack_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ func init() {
case "c", "r":
return carapace.ActionFiles()
case "x", "p":
// TODO untested - getting EOF error when trying to access archive
return carapace.ActionExecCommand("go", "tool", "pack", "t", c.Args[1])(func(output []byte) carapace.Action {
lines := strings.Split(string(output), "\n")
return carapace.ActionValues(lines...).StyleF(style.ForPathExt).MultiParts("/")
return carapace.ActionValues(lines[:len(lines)-1]...).StyleF(style.ForPathExt).MultiParts("/")
})
}
return carapace.ActionValues()
Expand Down

0 comments on commit b4ff466

Please sign in to comment.