@@ -25,8 +25,8 @@ func GetInstalledBoards(toComplete string) []string {
25
25
})
26
26
var res []string
27
27
// transform the data structure for the completion
28
- for _ , i := range list .GetBoards () {
29
- res = append (res , i .Fqbn )
28
+ for _ , i := range list .Boards {
29
+ res = append (res , i .Fqbn + " \t " + i . Name )
30
30
}
31
31
return res
32
32
}
@@ -71,21 +71,19 @@ func GetInstalledProgrammers(toComplete string) []string {
71
71
IncludeHiddenBoards : false ,
72
72
})
73
73
74
- // use this strange map because it should be more optimized
75
- // we use only the key and not the value because we do not need it
76
- installedProgrammers := make (map [string ]struct {})
77
- for _ , i := range list .GetBoards () {
74
+ installedProgrammers := make (map [string ]string )
75
+ for _ , i := range list .Boards {
78
76
fqbn , _ := cores .ParseFQBN (i .Fqbn )
79
77
_ , boardPlatform , _ , _ , _ , _ := pm .ResolveFQBN (fqbn )
80
- for programmerID := range boardPlatform .Programmers {
81
- installedProgrammers [programmerID ] = struct {}{}
78
+ for programmerID , programmer := range boardPlatform .Programmers {
79
+ installedProgrammers [programmerID ] = programmer . Name
82
80
}
83
81
}
84
82
85
83
res := make ([]string , len (installedProgrammers ))
86
84
i := 0
87
- for k := range installedProgrammers {
88
- res [i ] = k
85
+ for programmerID := range installedProgrammers {
86
+ res [i ] = programmerID + " \t " + installedProgrammers [ programmerID ]
89
87
i ++
90
88
}
91
89
return res
@@ -104,7 +102,7 @@ func GetUninstallableCores(toComplete string) []string {
104
102
var res []string
105
103
// transform the data structure for the completion
106
104
for _ , i := range platforms {
107
- res = append (res , i .GetId () )
105
+ res = append (res , i .Id + " \t " + i . Name )
108
106
}
109
107
return res
110
108
}
@@ -122,7 +120,7 @@ func GetInstallableCores(toComplete string) []string {
122
120
var res []string
123
121
// transform the data structure for the completion
124
122
for _ , i := range platforms .SearchOutput {
125
- res = append (res , i .GetId () )
123
+ res = append (res , i .Id + " \t " + i . Name )
126
124
}
127
125
return res
128
126
}
@@ -141,7 +139,7 @@ func GetUninstallableLibs(toComplete string) []string {
141
139
var res []string
142
140
// transform the data structure for the completion
143
141
for _ , i := range libs .InstalledLibraries {
144
- res = append (res , i .GetLibrary () .Name )
142
+ res = append (res , i .Library .Name + " \t " + i . Library . Sentence )
145
143
}
146
144
return res
147
145
}
@@ -158,7 +156,7 @@ func GetInstallableLibs(toComplete string) []string {
158
156
var res []string
159
157
// transform the data structure for the completion
160
158
for _ , i := range libs .Libraries {
161
- res = append (res , i .Name )
159
+ res = append (res , i .Name + " \t " + i . Latest . Sentence )
162
160
}
163
161
return res
164
162
}
0 commit comments