()
| 101 | } |
| 102 | |
| 103 | func newAliasListCmd() *cobra.Command { |
| 104 | var asJSON bool |
| 105 | |
| 106 | cmd := &cobra.Command{ |
| 107 | Use: "list", |
| 108 | Aliases: []string{"ls"}, |
| 109 | Short: "List all registered aliases", |
| 110 | Args: cobra.NoArgs, |
| 111 | RunE: func(cmd *cobra.Command, args []string) error { |
| 112 | return runAliasListCommand(cmd, args, asJSON) |
| 113 | }, |
| 114 | } |
| 115 | |
| 116 | cmd.Flags().BoolVar(&asJSON, "json", false, "Output aliases as JSON") |
| 117 | |
| 118 | return cmd |
| 119 | } |
| 120 | |
| 121 | func newAliasRemoveCmd() *cobra.Command { |
| 122 | return &cobra.Command{ |
no test coverage detected