-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1943 from rsteube/git-mailsplit
git: mailsplit
- Loading branch information
Showing
2 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.