Skip to content

Commit

Permalink
Merge pull request #1044 from carapace-sh/zsh-flags-tag
Browse files Browse the repository at this point in the history
zsh: join shorthand and longhand flags to single group
  • Loading branch information
rsteube authored Oct 16, 2024
2 parents 786a92b + e28295f commit a3537a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/shell/zsh/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ func quoteValue(s string) string {

// ActionRawValues formats values for zsh
func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string {
for index, value := range values {
switch value.Tag {
case "shorthand flags", "longhand flags":
values[index].Tag = "flags" // join to single tag group for classic zsh side-by-side view
}
}

tagGroup := make([]string, 0)
values.EachTag(func(tag string, values common.RawValues) {
Expand Down

0 comments on commit a3537a5

Please sign in to comment.