2019-01-06 06:44:33 +08:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rulesCmd.AddCommand(rulesLsCommand)
|
|
|
|
}
|
|
|
|
|
|
|
|
var rulesLsCommand = &cobra.Command{
|
|
|
|
Use: "ls",
|
|
|
|
Short: "List global rules or user specific rules",
|
|
|
|
Long: `List global rules or user specific rules.`,
|
|
|
|
Args: cobra.NoArgs,
|
2019-01-08 04:24:23 +08:00
|
|
|
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
|
|
|
runRules(d.store, cmd, nil, nil)
|
|
|
|
}, pythonConfig{}),
|
2019-01-06 06:44:33 +08:00
|
|
|
}
|