Skip to content

Commit

Permalink
git: mailsplit
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 29, 2023
1 parent 427d0b8 commit 470e129
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
33 changes: 33 additions & 0 deletions completers/git_completer/cmd/mailsplit.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package cmd

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

var mailsplitCmd = &cobra.Command{
Use: "mailsplit",
Short: "Simple UNIX mbox splitter program",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_low_level_helper].ID,
}

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

mailsplitCmd.Flags().BoolS("b", "b", false, "If any file doesn’t begin with a From line, assume it is a single mail message")
mailsplitCmd.Flags().StringS("d", "d", "", "Precision for the generated filenames")
mailsplitCmd.Flags().StringS("f", "f", "", "Skip the first <nn> numbers")
mailsplitCmd.Flags().Bool("keep-cr", false, "Do not remove \r from lines ending with \r\n")
mailsplitCmd.Flags().Bool("mboxrd", false, "Input is of the \"mboxrd\" format and \"^>+From \" line escaping is reversed")
mailsplitCmd.Flags().StringS("o", "o", "", "Directory in which to place the individual messages")
rootCmd.AddCommand(mailsplitCmd)

carapace.Gen(mailsplitCmd).FlagCompletion(carapace.ActionMap{
"o": carapace.ActionDirectories(),
})

carapace.Gen(mailsplitCmd).PositionalAnyCompletion(
carapace.ActionDirectories(),
)
}
19 changes: 0 additions & 19 deletions completers/git_completer/cmd/mailsplit_generated.go

This file was deleted.

0 comments on commit 470e129

Please sign in to comment.