@@ -14,18 +14,6 @@ import (
14
14
"github.com/lxc/incus/v6/shared/api"
15
15
)
16
16
17
- func (g * cmdGlobal ) appendCompletion (comps []string , comp , toComplete , remote string ) []string {
18
- if remote != g .conf .DefaultRemote || strings .Contains (toComplete , g .conf .DefaultRemote ) {
19
- comp = fmt .Sprintf ("%s:%s" , remote , comp )
20
- }
21
-
22
- if ! strings .HasPrefix (comp , toComplete ) {
23
- return comps
24
- }
25
-
26
- return append (comps , comp )
27
- }
28
-
29
17
func (g * cmdGlobal ) cmpClusterGroupNames (toComplete string ) ([]string , cobra.ShellCompDirective ) {
30
18
var results []string
31
19
cmpDirectives := cobra .ShellCompDirectiveNoFileComp
@@ -247,34 +235,6 @@ func (g *cmdGlobal) cmpImageFingerprintsFromRemote(toComplete string, remote str
247
235
return results , cobra .ShellCompDirectiveNoFileComp
248
236
}
249
237
250
- func (g * cmdGlobal ) cmpImageFingerprints (toComplete string ) ([]string , cobra.ShellCompDirective ) {
251
- results := []string {}
252
- var remote string
253
- cmpDirectives := cobra .ShellCompDirectiveNoFileComp
254
-
255
- if strings .Contains (toComplete , ":" ) {
256
- remote = strings .Split (toComplete , ":" )[0 ]
257
- } else {
258
- remote = g .conf .DefaultRemote
259
- }
260
-
261
- remoteServer , _ := g .conf .GetImageServer (remote )
262
-
263
- images , _ := remoteServer .GetImages ()
264
-
265
- for _ , image := range images {
266
- results = g .appendCompletion (results , image .Fingerprint , toComplete , remote )
267
- }
268
-
269
- if ! strings .Contains (toComplete , ":" ) {
270
- remotes , directives := g .cmpRemotes (toComplete , true )
271
- results = append (results , remotes ... )
272
- cmpDirectives |= directives
273
- }
274
-
275
- return results , cmpDirectives
276
- }
277
-
278
238
func (g * cmdGlobal ) cmpInstanceAllKeys () ([]string , cobra.ShellCompDirective ) {
279
239
keys := []string {}
280
240
for k := range instance .InstanceConfigKeysAny {
0 commit comments