git-project-manager/cmd/alias_list.go
2023-12-08 23:13:17 -05:00

25 lines
457 B
Go

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)
}