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

conditional nospace #1412

Merged
merged 1 commit into from
Nov 19, 2022
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
2 changes: 1 addition & 1 deletion completers/aws_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func init() {
a := carapace.ActionValues(lines[:len(lines)-1]...)
if strings.HasPrefix(current, "file://") ||
strings.HasPrefix(current, "fileb://") {
return a.NoSpace()
return a.NoSpace('/')
}
return a
}).Invoke(c).ToA()
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/action/keyword.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func ActionKeywordLinks(cmd *cobra.Command) carapace.Action {
return carapace.Batch(
carapace.ActionValues(keywordsOfficial...).Style(styles.Gh.StateClosed),
carapace.ActionValues(keywordsCustom...),
).ToA().Invoke(c).Suffix(" #").ToA()
).ToA().Invoke(c).Suffix(" #").ToA().NoSpace('#')
}

return carapace.ActionMultiParts("#", func(c carapace.Context) carapace.Action {
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func init() {
"input": carapace.ActionFiles(),
"method": http.ActionRequestMethods(),
"preview": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionApiPreviews().Invoke(c).Filter(c.Parts).ToA()
return action.ActionApiPreviews().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/auth_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {
"git-protocol": carapace.ActionValues("ssh", "https"),
"hostname": action.ActionConfigHosts(),
"scopes": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAuthScopes().Invoke(c).Filter(c.Parts).ToA()
return action.ActionAuthScopes().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/auth_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func init() {
carapace.Gen(auth_refreshCmd).FlagCompletion(carapace.ActionMap{
"hostname": action.ActionConfigHosts(),
"scopes": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAuthScopes().Invoke(c).Filter(c.Parts).ToA()
return action.ActionAuthScopes().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/codespace_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {

carapace.Gen(codespace_listCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionCodespaceFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionCodespaceFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"org": gh.ActionOrganizations(gh.HostOpts{}),
"repo": gh.ActionOwnerRepositories(gh.HostOpts{}),
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/codespace_ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {
carapace.Gen(codespace_portsCmd).FlagCompletion(carapace.ActionMap{
"codespace": action.ActionCodespaces(),
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionCodespacePortFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionCodespacePortFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/extension_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ func init() {

carapace.Gen(extension_searchCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionSearchRepositoryFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionSearchRepositoryFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"license": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return gh.ActionLicenses(gh.HostOpts{}).Invoke(c).Filter(c.Parts).ToA()
return gh.ActionLicenses(gh.HostOpts{}).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"order": carapace.ActionValues("asc", "desc"),
"owner": gh.ActionOwners(gh.HostOpts{}),
Expand Down
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/issue_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ func init() {

carapace.Gen(issue_createCmd).FlagCompletion(carapace.ActionMap{
"assignee": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAssignableUsers(issue_createCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionAssignableUsers(issue_createCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"body": action.ActionKeywordLinks(issue_createCmd),
"label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLabels(issue_createCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(issue_createCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"milestone": action.ActionMilestones(issue_createCmd),
"project": action.ActionProjects(issue_createCmd, action.ProjectOpts{Open: true}),
Expand Down
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/issue_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ func init() {

carapace.Gen(issue_editCmd).FlagCompletion(carapace.ActionMap{
"add-assignee": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAssignableUsers(issue_editCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionAssignableUsers(issue_editCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"add-label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLabels(issue_editCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(issue_editCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"add-project": action.ActionProjects(issue_editCmd, action.ProjectOpts{Open: true}),
"body": action.ActionKeywordLinks(issue_editCmd),
Expand Down
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/issue_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func init() {
"assignee": action.ActionAssignableUsers(issue_listCmd),
"author": gh.ActionUsers(gh.HostOpts{}),
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionIssueFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionIssueFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLabels(issue_listCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(issue_listCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"mention": action.ActionMentionableUsers(issue_listCmd),
"milestone": action.ActionMilestones(issue_listCmd),
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/issue_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func init() {

carapace.Gen(issue_statusCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionIssueFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionIssueFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/issue_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {

carapace.Gen(issue_viewCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionIssueFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionIssueFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/label_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {

carapace.Gen(label_listCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return gh.ActionLabelFields().Invoke(c).Filter(c.Parts).ToA()
return gh.ActionLabelFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"order": carapace.ActionValues("asc", "desc"),
"sort": carapace.ActionValues("created", "name"),
Expand Down
6 changes: 3 additions & 3 deletions completers/gh_completer/cmd/pr_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ func init() {

carapace.Gen(pr_createCmd).FlagCompletion(carapace.ActionMap{
"assignee": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAssignableUsers(pr_createCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionAssignableUsers(pr_createCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"base": action.ActionBranches(pr_createCmd),
"body": action.ActionKeywordLinks(pr_createCmd),
"head": action.ActionBranches(pr_createCmd),
"label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLabels(pr_createCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(pr_createCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"milestone": action.ActionMilestones(pr_createCmd),
"project": action.ActionProjects(pr_createCmd, action.ProjectOpts{Open: true}),
"reviewer": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAssignableUsers(pr_createCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionAssignableUsers(pr_createCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
6 changes: 3 additions & 3 deletions completers/gh_completer/cmd/pr_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ func init() {

carapace.Gen(pr_editCmd).FlagCompletion(carapace.ActionMap{
"add-assignee": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAssignableUsers(pr_editCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionAssignableUsers(pr_editCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"add-label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLabels(pr_editCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(pr_editCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"add-project": action.ActionProjects(pr_editCmd, action.ProjectOpts{Open: true}),
"add-reviewer": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionAssignableUsers(pr_editCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionAssignableUsers(pr_editCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"base": action.ActionBranches(pr_editCmd),
"body": action.ActionKeywordLinks(pr_editCmd),
Expand Down
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/pr_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func init() {
"base": action.ActionBranches(pr_listCmd),
"head": action.ActionBranches(pr_listCmd),
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionPullRequestFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionPullRequestFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionLabels(pr_listCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(pr_listCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"state": carapace.ActionValues("open", "closed", "merged", "all").StyleF(styles.Gh.ForState),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/pr_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {

carapace.Gen(pr_statusCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionPullRequestFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionPullRequestFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/pr_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {

carapace.Gen(pr_viewCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionPullRequestFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionPullRequestFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/release_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func init() {

carapace.Gen(release_viewCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionReleaseFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionReleaseFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/repo_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func init() {
repo_editCmd.Flags().String("repo", c.Args[0], "")
repo_editCmd.Flag("repo").Changed = true
}
return action.ActionRepoTopics(repo_editCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionRepoTopics(repo_editCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"visibility": carapace.ActionValues("public", "private", "internal"),
})
Expand Down
6 changes: 3 additions & 3 deletions completers/gh_completer/cmd/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ func init() {

carapace.Gen(repo_listCmd).FlagCompletion(carapace.ActionMap{
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionRepositoryFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionRepositoryFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"language": action.ActionLanguages(),
"topic": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
if len(c.Args) > 0 {
return action.ActionTopics(repo_listCmd, c.Args[0]).Invoke(c).Filter(c.Parts).ToA()
return action.ActionTopics(repo_listCmd, c.Args[0]).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}
return action.ActionTopics(repo_listCmd, "").Invoke(c).Filter(c.Parts).ToA()
return action.ActionTopics(repo_listCmd, "").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"visibility": carapace.ActionValues("public", "private", "internal"),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/repo_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
}
}),
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionRepositoryFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionRepositoryFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})

Expand Down
8 changes: 4 additions & 4 deletions completers/gh_completer/cmd/search_issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ func init() {
}),
"label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionSearchMultiRepo(search_issuesCmd, func(cmd *cobra.Command) carapace.Action {
return action.ActionLabels(cmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(cmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
})
}),
"language": action.ActionLanguages(),
"match": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("title", "body", "comments").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("title", "body", "comments").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"mentions": gh.ActionUsers(gh.HostOpts{}),
"milestone": action.ActionSearchMultiRepo(search_issuesCmd, func(cmd *cobra.Command) carapace.Action {
Expand All @@ -86,13 +86,13 @@ func init() {
"repo": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
dummyCmd := &cobra.Command{}
dummyCmd.Flags().String("repo", c.CallbackValue, "fake repo flag")
return action.ActionOwnerRepositories(dummyCmd)
return action.ActionOwnerRepositories(dummyCmd).NoSpace()
}),
"sort": carapace.ActionValues("comments", "created", "interactions", "reactions", "reactions-+1", "reactions--1", "reactions-heart", "reactions-smile", "reactions-tada", "reactions-thinking_face", "updated"),
"state": carapace.ActionValues("open", "closed").StyleF(styles.Gh.ForState),
"updated": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
"visibility": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("public", "private", "internal").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("public", "private", "internal").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
10 changes: 5 additions & 5 deletions completers/gh_completer/cmd/search_prs.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ func init() {
}),
"involves": gh.ActionUsers(gh.HostOpts{}),
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionSearchIssueFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionSearchIssueFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"label": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionSearchMultiRepo(search_prsCmd, func(cmd *cobra.Command) carapace.Action {
return action.ActionLabels(cmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionLabels(cmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
})
}),
"language": action.ActionLanguages(),
"match": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("title", "body", "comments").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("title", "body", "comments").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"mentions": gh.ActionUsers(gh.HostOpts{}),
"merged-at": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
Expand All @@ -102,7 +102,7 @@ func init() {
"repo": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
dummyCmd := &cobra.Command{}
dummyCmd.Flags().String("repo", c.CallbackValue, "fake repo flag")
return action.ActionOwnerRepositories(dummyCmd)
return action.ActionOwnerRepositories(dummyCmd).NoSpace()
}),
"review": carapace.ActionValues("none", "required", "approved", "changes_requested"),
"review-requested": action.ActionSearchMultiRepo(search_prsCmd, func(cmd *cobra.Command) carapace.Action {
Expand All @@ -115,7 +115,7 @@ func init() {
"state": carapace.ActionValues("open", "closed").StyleF(styles.Gh.ForState),
"updated": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
"visibility": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("public", "private", "internal").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("public", "private", "internal").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
8 changes: 4 additions & 4 deletions completers/gh_completer/cmd/search_repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ func init() {
"created": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
"include-forks": carapace.ActionValues("false", "true", "only"),
"json": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionSearchRepositoryFields().Invoke(c).Filter(c.Parts).ToA()
return action.ActionSearchRepositoryFields().Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"language": action.ActionLanguages(),
"license": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return gh.ActionLicenses(gh.HostOpts{}).Invoke(c).Filter(c.Parts).ToA()
return gh.ActionLicenses(gh.HostOpts{}).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"match": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("name", "description", "readme").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("name", "description", "readme").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"order": carapace.ActionValues("asc", "desc"),
"owner": gh.ActionOwners(gh.HostOpts{}),
Expand All @@ -63,7 +63,7 @@ func init() {
}),
"updated": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
"visibility": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("public", "private", "internal").Invoke(c).Filter(c.Parts).ToA()
return carapace.ActionValues("public", "private", "internal").Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
})
}
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/secret_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func init() {
"env-file": carapace.ActionFiles(),
"org": gh.ActionOrganizations(gh.HostOpts{}),
"repos": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionOwnerRepositories(secret_setCmd).Invoke(c).Filter(c.Parts).ToA()
return action.ActionOwnerRepositories(secret_setCmd).Invoke(c).Filter(c.Parts).ToA().NoSpace()
}),
"visibility": carapace.ActionValues("all", "private", "selected"),
})
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func init() {

carapace.Gen(statusCmd).FlagCompletion(carapace.ActionMap{
"exclude": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return action.ActionOwnerRepositories(statusCmd)
return action.ActionOwnerRepositories(statusCmd).NoSpace()
}),
"org": gh.ActionOrganizations(gh.HostOpts{}),
})
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.19
require (
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/pelletier/go-toml v1.9.5
github.com/rsteube/carapace v0.25.1
github.com/rsteube/carapace-spec v0.2.1
github.com/rsteube/carapace v0.26.0
github.com/rsteube/carapace-spec v0.3.0
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
gopkg.in/ini.v1 v1.67.0
Expand All @@ -16,7 +16,7 @@ require (
require (
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/invopop/jsonschema v0.6.0 // indirect
github.com/invopop/jsonschema v0.7.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
)

Expand Down
Loading