Implement cache migrations
This commit is contained in:
@ -3,10 +3,11 @@ package alias
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/cmd/util"
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/cmd/util"
|
||||
)
|
||||
|
||||
// listCmd represents the list command
|
||||
@ -21,10 +22,18 @@ var aliasListCmd = &cobra.Command{
|
||||
|
||||
func runListAliasCmd(cmd *cobra.Command, args []string) {
|
||||
remotes := viper.GetStringSlice(util.FlagRemote)
|
||||
pterm.DefaultBox.
|
||||
aliases := utils.Cache().AliasesByProjectString(remotes...)
|
||||
|
||||
printer := pterm.DefaultBox.
|
||||
WithLeftPadding(5).WithRightPadding(5).
|
||||
WithBoxStyle(&pterm.Style{pterm.FgLightBlue}).
|
||||
WithTitle(pterm.Bold.Sprint(pterm.LightGreen("Aliases by Project"))).
|
||||
Print("\n" + utils.Cache().AliasesByProjectString(remotes...))
|
||||
WithTitle(pterm.Bold.Sprint(pterm.LightGreen("Aliases by Project")))
|
||||
|
||||
if len(aliases) < 1 {
|
||||
printer.Print("\n" + "No Aliases Found")
|
||||
} else {
|
||||
printer.Print("\n" + aliases)
|
||||
}
|
||||
|
||||
fmt.Print("\n\n")
|
||||
}
|
||||
|
Reference in New Issue
Block a user