Move from --gitlab flags to global --remote flags
This commit is contained in:
4
internal/cache/cache_projects.go
vendored
4
internal/cache/cache_projects.go
vendored
@@ -43,7 +43,7 @@ func (c *Cache) AddProjects(gitProjects ...*projects.Project) {
|
||||
|
||||
// This command will only dump projects that have
|
||||
// been cloned locally. Setting all to true will list all projects
|
||||
func (c *Cache) DumpString(all bool, search string, gitlabs ...string) string {
|
||||
func (c *Cache) DumpString(all bool, search string, remotes ...string) string {
|
||||
str := strings.Builder{}
|
||||
var term string
|
||||
if all {
|
||||
@@ -56,7 +56,7 @@ func (c *Cache) DumpString(all bool, search string, gitlabs ...string) string {
|
||||
for _, project := range projects {
|
||||
if !all && !c.IsProjectCloned(project) {
|
||||
continue
|
||||
} else if len(gitlabs) > 0 && !slices.Contains(gitlabs, project.Remote) {
|
||||
} else if len(remotes) > 0 && !slices.Contains(remotes, project.Remote) {
|
||||
continue
|
||||
}
|
||||
str.WriteString(" - " + pterm.FgLightBlue.Sprint(project.Name) + " (")
|
||||
|
||||
Reference in New Issue
Block a user