git-project-manager/cmd/alias_list.go

25 lines
457 B
Go
Raw Normal View History

2023-12-09 04:13:17 +00:00
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// listCmd represents the list command
var aliasListCmd = &cobra.Command{
Use: "list",
Aliases: []string{"dump", "show", "ls", "ll", "l"},
Short: "List Aliases",
Long: aliasListCmdLong,
Run: runListAliasCmd,
}
func runListAliasCmd(cmd *cobra.Command, args []string) {
fmt.Print("\n" + cache.AliasesByProjectString() + "\n")
}
func init() {
aliasCmd.AddCommand(aliasListCmd)
}