Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated carapace #269

Merged
merged 1 commit into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions completers/pass_completer/cmd/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ func init() {

carapace.Gen(cpCmd).PositionalCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
)
}
2 changes: 1 addition & 1 deletion completers/pass_completer/cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func init() {

carapace.Gen(editCmd).PositionalCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
)
}
2 changes: 1 addition & 1 deletion completers/pass_completer/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {

carapace.Gen(generateCmd).PositionalCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
carapace.ActionValues("8", "12", "16", "20", "24", "28", "32"),
)
Expand Down
2 changes: 1 addition & 1 deletion completers/pass_completer/cmd/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func init() {

carapace.Gen(insertCmd).PositionalCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
)
}
4 changes: 2 additions & 2 deletions completers/pass_completer/cmd/mv.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ func init() {

carapace.Gen(mvCmd).PositionalCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
)
}
2 changes: 1 addition & 1 deletion completers/pass_completer/cmd/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func init() {

carapace.Gen(rmCmd).PositionalCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionPassNames().Invoke(args).ToMultipartsA("/")
return action.ActionPassNames().Invoke(args).ToMultiPartsA("/")
}),
)
}
2 changes: 1 addition & 1 deletion completers/rustup_completer/cmd/component_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {

carapace.Gen(component_addCmd).FlagCompletion(carapace.ActionMap{
"target": carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionTargets(false).Invoke(args).ToMultipartsA("-")
return action.ActionTargets(false).Invoke(args).ToMultiPartsA("-")
}),
"toolchain": action.ActionToolchains(),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/rustup_completer/cmd/component_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {

carapace.Gen(component_removeCmd).FlagCompletion(carapace.ActionMap{
"target": carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionTargets(false).Invoke(args).ToMultipartsA("-")
return action.ActionTargets(false).Invoke(args).ToMultiPartsA("-")
}),
"toolchain": action.ActionToolchains(),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/rustup_completer/cmd/target_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {

carapace.Gen(target_addCmd).PositionalAnyCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionTargets(false).Invoke(args).Filter(args).ToMultipartsA("-")
return action.ActionTargets(false).Invoke(args).Filter(args).ToMultiPartsA("-")
}),
)
}
2 changes: 1 addition & 1 deletion completers/rustup_completer/cmd/target_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {

carapace.Gen(target_removeCmd).PositionalAnyCompletion(
carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionTargets(true).Invoke(args).Filter(args).ToMultipartsA("-")
return action.ActionTargets(true).Invoke(args).Filter(args).ToMultiPartsA("-")
}),
)
}
2 changes: 1 addition & 1 deletion completers/rustup_completer/cmd/toolchain_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func init() {
}),
"profile": carapace.ActionValues("minimal", "default", "complete"),
"target": carapace.ActionCallback(func(args []string) carapace.Action {
return action.ActionTargets(false).Invoke(args).ToMultipartsA("-")
return action.ActionTargets(false).Invoke(args).ToMultiPartsA("-")
}),
})

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-ps v1.0.0
github.com/pelletier/go-toml v1.8.1
github.com/rsteube/carapace v0.2.1
github.com/rsteube/carapace v0.2.2
github.com/spf13/cobra v1.1.1
gopkg.in/ini.v1 v1.62.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rsteube/carapace v0.2.1 h1:bfTuzCnN8c285YAbkagVtQ9SoPH2Jyqj4HURPt3FwcQ=
github.com/rsteube/carapace v0.2.1/go.mod h1:KFUcTCOChx8NdnMn7+l/3/ty+BLt+I3ciWnBwoT/OQk=
github.com/rsteube/carapace v0.2.2 h1:kEhBT+vTqBardagDIh+VRCYlFRptQsevb6eWtJ+oMas=
github.com/rsteube/carapace v0.2.2/go.mod h1:KFUcTCOChx8NdnMn7+l/3/ty+BLt+I3ciWnBwoT/OQk=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
Expand Down
2 changes: 1 addition & 1 deletion pkg/actions/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func ActionZipFileContents(file string) carapace.Action {
for _, f := range reader.File {
vals = append(vals, f.Name)
}
return carapace.ActionValues(vals...).Invoke(args).ToMultipartsA("/")
return carapace.ActionValues(vals...).Invoke(args).ToMultiPartsA("/")
}
})
}
4 changes: 2 additions & 2 deletions pkg/actions/git/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ func ActionConfigs() carapace.Action {
} else {
vals := make([]string, 0)
for _, line := range strings.Split(string(output), "\n") {
if line != "" && !strings.ContainsAny(line, "<>*") {
if line != "" && !strings.ContainsAny(line, "<>*") && !strings.Contains(line, "git help config") {
vals = append(vals, line)
}
}
return carapace.ActionValues(vals...).Invoke(args).ToMultipartsA(".")
return carapace.ActionValues(vals...).Invoke(args).ToMultiPartsA(".")
}
})
}