Move from --gitlab flags to global --remote flags
This commit is contained in:
5
internal/cache/projects_alias.go
vendored
5
internal/cache/projects_alias.go
vendored
@ -43,13 +43,16 @@ func ProjectAliasesString(aliases []*ProjectAlias) string {
|
||||
return strings.Trim(str, " ")
|
||||
}
|
||||
|
||||
func (c *Cache) AliasesByProjectString() string {
|
||||
func (c *Cache) AliasesByProjectString(remotes ...string) string {
|
||||
var str bytes.Buffer
|
||||
|
||||
w := new(tabwriter.Writer)
|
||||
w.Init(&str, 10, 0, 0, ' ', tabwriter.AlignRight)
|
||||
|
||||
for _, p := range c.GetProjectsWithAliases() {
|
||||
if !slices.Contains(remotes, p.Remote) {
|
||||
continue
|
||||
}
|
||||
var pa string
|
||||
pa += pterm.LightBlue("- ")
|
||||
pa += fmt.Sprint(pterm.Bold.Sprint(p.String()) + " \t ")
|
||||
|
Reference in New Issue
Block a user