mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-23 08:01:15 +00:00
30 lines
840 B
Go
30 lines
840 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/rsteube/carapace"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var pub_uploaderCmd = &cobra.Command{
|
|
Use: "uploader",
|
|
Short: "Manage uploaders for a package on pub.dartlang.org",
|
|
Run: func(cmd *cobra.Command, args []string) {},
|
|
}
|
|
|
|
func init() {
|
|
carapace.Gen(pub_uploaderCmd).Standalone()
|
|
|
|
pub_uploaderCmd.Flags().StringP("directory", "C", "", "Run this in the directory<dir>.")
|
|
pub_uploaderCmd.Flags().BoolP("help", "h", false, "Print this usage information.")
|
|
pub_uploaderCmd.Flags().Bool("package", false, "The package whose uploaders will be modified.")
|
|
pubCmd.AddCommand(pub_uploaderCmd)
|
|
|
|
carapace.Gen(pub_uploaderCmd).FlagCompletion(carapace.ActionMap{
|
|
"directory": carapace.ActionDirectories(),
|
|
})
|
|
|
|
carapace.Gen(pub_uploaderCmd).PositionalCompletion(
|
|
carapace.ActionValues("add", "remove"),
|
|
)
|
|
}
|