mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-16 04:34:32 +00:00
27 lines
731 B
Go
27 lines
731 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/rsteube/carapace"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var lsCmd = &cobra.Command{
|
|
Use: "ls [OPTIONS]",
|
|
Short: "List running compose projects",
|
|
Run: func(cmd *cobra.Command, args []string) {},
|
|
}
|
|
|
|
func init() {
|
|
carapace.Gen(lsCmd).Standalone()
|
|
|
|
lsCmd.Flags().BoolP("all", "a", false, "Show all stopped Compose projects")
|
|
lsCmd.Flags().String("filter", "", "Filter output based on conditions provided.")
|
|
lsCmd.Flags().String("format", "table", "Format the output. Values: [table | json].")
|
|
lsCmd.Flags().BoolP("quiet", "q", false, "Only display IDs.")
|
|
rootCmd.AddCommand(lsCmd)
|
|
|
|
carapace.Gen(lsCmd).FlagCompletion(carapace.ActionMap{
|
|
"format": carapace.ActionValues("table", "json"),
|
|
})
|
|
}
|