@@ -66,6 +66,11 @@ func registerEdit(cmd *cobra.Command, commentPrefix string) {
66
66
67
67
// negative performance impact: https://gitlab.com/qemu-project/qemu/-/issues/334
68
68
flags .Bool ("video" , false , commentPrefix + "Enable video output (has negative performance impact for QEMU)" )
69
+
70
+ flags .Float32 ("disk" , 0 , commentPrefix + "Disk size in GiB" ) // colima-compatible
71
+ _ = cmd .RegisterFlagCompletionFunc ("disk" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
72
+ return []string {"10" , "30" , "50" , "100" , "200" }, cobra .ShellCompDirectiveNoFileComp
73
+ })
69
74
}
70
75
71
76
// RegisterCreate registers flags related to in-place YAML modification, for `limactl create`.
@@ -83,11 +88,6 @@ func RegisterCreate(cmd *cobra.Command, commentPrefix string) {
83
88
return []string {"user" , "system" , "user+system" , "none" }, cobra .ShellCompDirectiveNoFileComp
84
89
})
85
90
86
- flags .Float32 ("disk" , 0 , commentPrefix + "Disk size in GiB" ) // colima-compatible
87
- _ = cmd .RegisterFlagCompletionFunc ("memory" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
88
- return []string {"10" , "30" , "50" , "100" , "200" }, cobra .ShellCompDirectiveNoFileComp
89
- })
90
-
91
91
flags .String ("vm-type" , "" , commentPrefix + "Virtual machine type (qemu, vz)" ) // colima-compatible
92
92
_ = cmd .RegisterFlagCompletionFunc ("vm-type" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
93
93
return []string {"qemu" , "vz" }, cobra .ShellCompDirectiveNoFileComp
@@ -241,7 +241,7 @@ func YQExpressions(flags *flag.FlagSet, newInstance bool) ([]string, error) {
241
241
true ,
242
242
false ,
243
243
},
244
- {"disk" , d (".disk= \" %sGiB\" " ), true , false },
244
+ {"disk" , d (".disk= \" %sGiB\" " ), false , false },
245
245
{"vm-type" , d (".vmType = %q" ), true , false },
246
246
{"plain" , d (".plain = %s" ), true , false },
247
247
}
0 commit comments