Skip to content

Commit

Permalink
Merge pull request #1943 from rsteube/git-mailsplit
Browse files Browse the repository at this point in the history
git: mailsplit
  • Loading branch information
rsteube authored Oct 29, 2023
2 parents 3c1864c + 470e129 commit fbd092e
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 fbd092e

Please sign in to comment.