Package subcommand code

This commit is contained in:
2024-12-30 15:50:31 -05:00
parent 96378d047e
commit b9d7d5a4f2
51 changed files with 357 additions and 295 deletions

View File

@@ -20,15 +20,11 @@ var aliasListCmd = &cobra.Command{
}
func runListAliasCmd(cmd *cobra.Command, args []string) {
remotes := viper.GetStringSlice(FlagRemote)
remotes := viper.GetStringSlice(util.FlagRemote)
pterm.DefaultBox.
WithLeftPadding(5).WithRightPadding(5).
WithBoxStyle(&pterm.Style{pterm.FgLightBlue}).
WithTitle(pterm.Bold.Sprint(pterm.LightGreen("Aliases by Project"))).
Print("\n" + projectCache.AliasesByProjectString(remotes...))
Print("\n" + utils.Cache().AliasesByProjectString(remotes...))
fmt.Print("\n\n")
}
func init() {
aliasCmd.AddCommand(aliasListCmd)
}