Skip to content

Commit

Permalink
fix multiparts completion (nospace)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Nov 20, 2022
1 parent 6ec6c10 commit a063dfa
Show file tree
Hide file tree
Showing 181 changed files with 285 additions and 285 deletions.
2 changes: 1 addition & 1 deletion completers/agg_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func init() {
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"font-dir": carapace.ActionDirectories(),
"font-family": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionFontFamilies().Invoke(c).Filter(c.Parts).ToA()
return os.ActionFontFamilies().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"renderer": carapace.ActionValues("fontdue", "resvg"),
"theme": carapace.ActionValues("asciinema", "dracula", "monokai", "solarized-dark", "solarized-light", "custom"),
Expand Down
2 changes: 1 addition & 1 deletion completers/asciinema_completer/cmd/rec.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func init() {
os.ActionPathExecutables(),
).ToA(),
"env": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionEnvironmentVariables().Invoke(c).Filter(c.Parts).ToA()
return os.ActionEnvironmentVariables().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/bat_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func init() {
"language": action.ActionLanguages(),
"paging": carapace.ActionValues("auto", "never", "always").StyleF(style.ForKeyword),
"style": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("auto", "full", "plain", "changes", "header", "grid", "numbers", "snip").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("auto", "full", "plain", "changes", "header", "grid", "numbers", "snip").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"theme": action.ActionThemes(),
"wrap": carapace.ActionValues("auto", "never", "character"),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo-metadata_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func init() {
"Z": cargo.ActionNightlyFlags(),
"color": carapace.ActionValues("auto", "always", "never").StyleF(style.ForKeyword),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(rootCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(rootCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"format-version": carapace.ActionValues("1"),
"manifest-path": carapace.ActionFiles(),
Expand Down
4 changes: 2 additions & 2 deletions completers/cargo_completer/cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func init() {
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
if len(c.Args) == 1 && !util.HasPathPrefix(c.Args[0]) {
// TODO limit to specific version
return action.ActionGithubPackageFeatures(strings.Split(c.Args[0], "@")[0]).Invoke(c).Filter(c.Parts).ToA()
return action.ActionGithubPackageFeatures(strings.Split(c.Args[0], "@")[0]).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}
return carapace.ActionValues()
}),
Expand All @@ -79,7 +79,7 @@ func init() {
return carapace.ActionMultiParts("@", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return action.ActionGithubPackageSearch()
return action.ActionGithubPackageSearch().NoSpace()
case 1:
return action.ActionGithubPackageVersions(c.Parts[0])
default:
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func init() {
"example": action.ActionTargets(benchCmd, action.TargetOpts{Example: true}),
"exclude": action.ActionWorkspaceMembers(benchCmd),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(benchCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(benchCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func init() {
"example": action.ActionTargets(buildCmd, action.TargetOpts{Example: true}),
"exclude": action.ActionWorkspaceMembers(buildCmd),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(buildCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(buildCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func init() {
"color": action.ActionColorModes(),
"exclude": action.ActionWorkspaceMembers(docCmd),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(docCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(docCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func init() {
"example": action.ActionTargets(fixCmd, action.TargetOpts{Example: true}),
"exclude": action.ActionWorkspaceMembers(fixCmd),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(fixCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(fixCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func init() {
"color": action.ActionColorModes(),
"example": action.ActionTargets(installCmd, action.TargetOpts{Example: true}),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures("").Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures("").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"path": carapace.ActionFiles(),
"profile": action.ActionProfiles(installCmd),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func init() {
carapace.Gen(publishCmd).FlagCompletion(carapace.ActionMap{
"color": action.ActionColorModes(),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(publishCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(publishCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"registry": action.ActionRegistries(),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func init() {
"color": action.ActionColorModes(),
"example": action.ActionTargets(runCmd, action.TargetOpts{Example: true}),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(runCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(runCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
Expand Down
2 changes: 1 addition & 1 deletion completers/cargo_completer/cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func init() {
"example": action.ActionTargets(testCmd, action.TargetOpts{Example: true}),
"exclude": action.ActionWorkspaceMembers(testCmd),
"features": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return cargo.ActionFeatures(testCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA()
return cargo.ActionFeatures(testCmd.Flag("manifest-path").Value.String()).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
Expand Down
2 changes: 1 addition & 1 deletion completers/chroot_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {

carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"groups": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionGroups().Invoke(c).Filter(c.Parts).ToA()
return os.ActionGroups().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"userspec": os.ActionUserGroup(),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/clamdtop_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func init() {
return carapace.ActionMultiParts(":", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return net.ActionHosts()
return net.ActionHosts().NoSpace()
case 1:
return net.ActionPorts()
default:
Expand Down
2 changes: 1 addition & 1 deletion completers/code_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func init() {
"goto": carapace.ActionMultiParts(":", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return carapace.ActionFiles()
return carapace.ActionFiles().NoSpace()
default:
return carapace.ActionValues()
}
Expand Down
2 changes: 1 addition & 1 deletion completers/consul_completer/cmd/action/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ func ActionOptionalFiles(suffix ...string) carapace.Action {
return carapace.ActionMultiParts("@", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 1:
return carapace.ActionFiles(suffix...)
return carapace.ActionFiles(suffix...).NoSpace()
default:
return carapace.ActionValues()
}
Expand Down
2 changes: 1 addition & 1 deletion completers/consul_completer/cmd/action/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func ActionNodeIdentity(cmd *cobra.Command) carapace.Action {
return carapace.ActionMultiParts(":", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return ActionNodes(cmd)
return ActionNodes(cmd).NoSpace()
case 1:
return ActionDatacenters(cmd)
default:
Expand Down
2 changes: 1 addition & 1 deletion completers/consul_completer/cmd/action/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func ActionServiceIdentity(cmd *cobra.Command) carapace.Action {
return ActionServices(cmd)
case 1:
return carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return ActionDatacenters(cmd).Invoke(c).Filter(c.Parts).ToA()
return ActionDatacenters(cmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
})
default:
return carapace.ActionValues()
Expand Down
2 changes: 1 addition & 1 deletion completers/deno_completer/cmd/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func ActionHostPort() carapace.Action {
return carapace.ActionMultiParts(":", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return carapace.ActionValues() // TODO local ips
return carapace.ActionValues().NoSpace() // TODO local ips
case 1:
return net.ActionPorts()
default:
Expand Down
4 changes: 2 additions & 2 deletions completers/deno_completer/cmd/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ func init() {
carapace.Gen(lintCmd).FlagCompletion(carapace.ActionMap{
"config": carapace.ActionFiles(),
"rules-exclude": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLintRules().Invoke(c).Filter(c.Parts).ToA()
return action.ActionLintRules().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"rules-include": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLintRules().Invoke(c).Filter(c.Parts).ToA()
return action.ActionLintRules().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/dfc_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func init() {
}),
"q": carapace.ActionValues("name", "type", "mount"),
"t": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return fs.ActionFilesystemTypes().Invoke(c).Filter(c.Parts).ToA()
return fs.ActionFilesystemTypes().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"u": carapace.ActionValuesDescribed(
"h", "Human readable",
Expand Down
4 changes: 2 additions & 2 deletions completers/dmesg_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ func init() {
"color": carapace.ActionValues("auto", "never", "always").StyleF(style.ForKeyword),
"console-level": action.ActionLogLevels(),
"facility": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionFacilities().Invoke(c).Filter(c.Parts).ToA()
return action.ActionFacilities().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"file": carapace.ActionFiles(),
"level": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLogLevels().Invoke(c).Filter(c.Parts).ToA()
return action.ActionLogLevels().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"time-format": carapace.ActionValues("delta", "reltime", "ctime", "notime", "iso"),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/faas-cli_completer/cmd/cloud_seal.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func init() {
"cert": carapace.ActionFiles(".pem"),
"download-to": carapace.ActionDirectories(),
"from-file": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionFiles()
return carapace.ActionFiles().NoSpace()
}),
"namespace": action.ActionNamespaces(),
"output-file": carapace.ActionFiles(),
Expand Down
8 changes: 4 additions & 4 deletions completers/ffmpeg_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func init() {
return carapace.ActionMultiParts("=", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return action.ActionFilters()
return action.ActionFilters().NoSpace()
default:
return carapace.ActionValues()
}
Expand Down Expand Up @@ -155,15 +155,15 @@ func init() {
"sinks": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return action.ActionDevices()
return action.ActionDevices().NoSpace()
default:
return carapace.ActionValues()
}
}),
"sources": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return action.ActionDevices()
return action.ActionDevices().NoSpace()
default:
return carapace.ActionValues()
}
Expand All @@ -173,7 +173,7 @@ func init() {
return carapace.ActionMultiParts("=", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return action.ActionFilters()
return action.ActionFilters().NoSpace()
default:
return carapace.ActionValues()
}
Expand Down
2 changes: 1 addition & 1 deletion completers/file_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func init() {
"exclude-quiet": ActionTests(),
"files-from": carapace.ActionFiles(),
"magic-file": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionFiles()
return carapace.ActionFiles().NoSpace()
}),
})

Expand Down
4 changes: 2 additions & 2 deletions completers/find_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ func init() {
"perm": fs.ActionFileModes(),
"regextype": carapace.ActionValues("findutils-default", "ed", "emacs", "gnu-awk", "grep", "posix-awk", "awk", "posix-basic", "posix-egrep", "egrep", "posix-extended", "posix-minimal-basic", "sed"),
"type": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return ActionFileTypes().Invoke(c).Filter(c.Parts).ToA()
return ActionFileTypes().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"user": os.ActionUsers(),
"xtype": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return ActionFileTypes().Invoke(c).Filter(c.Parts).ToA()
return ActionFileTypes().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/fish_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func init() {
"stderr-nocaret", "^ no longer redirects stderr",
"qmark-noglob", "? no longer globs",
"regex-easyesc", `string replace -r needs fewer \'s`,
).Invoke(c).Filter(c.Parts).ToA()
).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"profile": carapace.ActionFiles(),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/flutter_completer/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func init() {
"android-language": carapace.ActionValues("java", "kotlin"),
"ios-language": carapace.ActionValues("objc", "swift"),
"platforms": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("ios", "android", "windows", "linux", "macos", "web").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("ios", "android", "windows", "linux", "macos", "web").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"sample": action.ActionSamples(),
"template": carapace.ActionValuesDescribed(
Expand Down
2 changes: 1 addition & 1 deletion completers/fzf_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func init() {
"info": carapace.ActionValues("default", "inline", "hidden"),
"layout": carapace.ActionValues("default", "reverse", "reverse-list"),
"tiebreak": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("length", "begin", "end", "index").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("length", "begin", "end", "index").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
2 changes: 1 addition & 1 deletion completers/gdu_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func init() {

carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"ignore-dirs": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionDirectories()
return carapace.ActionDirectories().NoSpace()
}),
"ignore-from": carapace.ActionFiles(),
"input-file": carapace.ActionFiles(),
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/action/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func ActionSearchRange(a carapace.Action) carapace.Action {
if len(c.Parts) > 1 {
return carapace.ActionValues()
}
return a
return a.NoSpace()
})
}),
).ToA()
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/release_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func init() {
carapace.ActionMultiParts("#", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return carapace.ActionFiles()
return carapace.ActionFiles().NoSpace()
default:
return carapace.ActionValues()
}
Expand Down
2 changes: 1 addition & 1 deletion completers/git_completer/cmd/bisect.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {
if len(c.Parts) > 2 {
return carapace.ActionValues()
}
return git.ActionRefs(git.RefOption{}.Default())
return git.ActionRefs(git.RefOption{}.Default()).NoSpace()
}),
)
}
2 changes: 1 addition & 1 deletion completers/git_completer/cmd/cherryPick.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func init() {
// TODO `...` divider not yet working
carapace.ActionMultiParts("...", func(c carapace.Context) carapace.Action {
if len(c.Parts) < 2 {
return git.ActionRefs(git.RefOption{}.Default())
return git.ActionRefs(git.RefOption{}.Default()).NoSpace()
}
return carapace.ActionValues()
}),
Expand Down
2 changes: 1 addition & 1 deletion completers/git_completer/cmd/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func addDiffFlags(cmd *cobra.Command) {
"submodule": carapace.ActionValues("short", "long", "log"),
"word-diff": ActionWordDiffModes(),
"ws-error-highlight": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return ActionWsErrorHighlightModes().Invoke(c).Filter(c.Parts).ToA()
return ActionWsErrorHighlightModes().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/git_completer/cmd/formatPatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func init() {
carapace.ActionMultiParts("...", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0:
return git.ActionRefs(git.RefOption{}.Default())
return git.ActionRefs(git.RefOption{}.Default()).NoSpace()
case 1:
return git.ActionRefs(git.RefOption{}.Default())
default:
Expand Down
Loading

0 comments on commit a063dfa

Please sign in to comment.