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

git: mailinfo #1944

Merged
merged 1 commit into from
Oct 29, 2023
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
34 changes: 34 additions & 0 deletions completers/git_completer/cmd/mailinfo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var mailinfoCmd = &cobra.Command{
Use: "mailinfo",
Short: "Extracts patch and authorship from a single e-mail message",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_low_level_helper].ID,
}

func init() {
carapace.Gen(mailinfoCmd).Standalone()

mailinfoCmd.Flags().BoolS("b", "b", false, "keep non patch brackets in subject")
mailinfoCmd.Flags().BoolS("k", "k", false, "keep subject")
mailinfoCmd.Flags().BoolP("message-id", "m", false, "copy Message-ID to the end of commit message")
mailinfoCmd.Flags().BoolS("n", "n", false, "disable charset re-coding of metadata")
mailinfoCmd.Flags().String("quoted-cr", "", "action when quoted CR is found")
mailinfoCmd.Flags().Bool("scissors", false, "use scissors")
mailinfoCmd.Flags().BoolS("u", "u", false, "re-code metadata to i18n.commitEncoding")
rootCmd.AddCommand(mailinfoCmd)

carapace.Gen(mailinfoCmd).FlagCompletion(carapace.ActionMap{
"quoted-cr": carapace.ActionValuesDescribed(
"nowarn", "Git will do nothing when such a CRLF is found",
"warn", "Git will issue a warning for each message if such a CRLF is found",
"strip", "Git will convert those CRLF to LF",
),
})
}
19 changes: 0 additions & 19 deletions completers/git_completer/cmd/mailinfo_generated.go

This file was deleted.