@@ -24,7 +24,7 @@ func RegisterEdit(cmd *cobra.Command) {
24
24
func registerEdit (cmd * cobra.Command , commentPrefix string ) {
25
25
flags := cmd .Flags ()
26
26
27
- flags .Int ("cpus" , 0 , commentPrefix + "number of CPUs" ) // Similar to colima's --cpu, but the flag name is slightly different (cpu vs cpus)
27
+ flags .Int ("cpus" , 0 , commentPrefix + "Number of CPUs" ) // Similar to colima's --cpu, but the flag name is slightly different (cpu vs cpus)
28
28
_ = cmd .RegisterFlagCompletionFunc ("cpus" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
29
29
var res []string
30
30
for _ , f := range completeCPUs (runtime .NumCPU ()) {
@@ -33,9 +33,9 @@ func registerEdit(cmd *cobra.Command, commentPrefix string) {
33
33
return res , cobra .ShellCompDirectiveNoFileComp
34
34
})
35
35
36
- flags .IPSlice ("dns" , nil , commentPrefix + "specify custom DNS (disable host resolver)" ) // colima-compatible
36
+ flags .IPSlice ("dns" , nil , commentPrefix + "Specify custom DNS (disable host resolver)" ) // colima-compatible
37
37
38
- flags .Float32 ("memory" , 0 , commentPrefix + "memory in GiB" ) // colima-compatible
38
+ flags .Float32 ("memory" , 0 , commentPrefix + "Memory in GiB" ) // colima-compatible
39
39
_ = cmd .RegisterFlagCompletionFunc ("memory" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
40
40
var res []string
41
41
for _ , f := range completeMemoryGiB (memory .TotalMemory ()) {
@@ -44,36 +44,36 @@ func registerEdit(cmd *cobra.Command, commentPrefix string) {
44
44
return res , cobra .ShellCompDirectiveNoFileComp
45
45
})
46
46
47
- flags .StringSlice ("mount" , nil , commentPrefix + "directories to mount, suffix ':w' for writable (Do not specify directories that overlap with the existing mounts)" ) // colima-compatible
47
+ flags .StringSlice ("mount" , nil , commentPrefix + "Directories to mount, suffix ':w' for writable (Do not specify directories that overlap with the existing mounts)" ) // colima-compatible
48
48
49
- flags .String ("mount-type" , "" , commentPrefix + "mount type (reverse-sshfs, 9p, virtiofs)" ) // Similar to colima's --mount-type=(sshfs|9p|virtiofs), but "reverse-sshfs" is Lima is called "sshfs" in colima
49
+ flags .String ("mount-type" , "" , commentPrefix + "Mount type (reverse-sshfs, 9p, virtiofs)" ) // Similar to colima's --mount-type=(sshfs|9p|virtiofs), but "reverse-sshfs" is Lima is called "sshfs" in colima
50
50
_ = cmd .RegisterFlagCompletionFunc ("mount-type" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
51
51
return []string {"reverse-sshfs" , "9p" , "virtiofs" }, cobra .ShellCompDirectiveNoFileComp
52
52
})
53
53
54
- flags .Bool ("mount-writable" , false , commentPrefix + "make all mounts writable" )
55
- flags .Bool ("mount-inotify" , false , commentPrefix + "enable inotify for mounts" )
54
+ flags .Bool ("mount-writable" , false , commentPrefix + "Make all mounts writable" )
55
+ flags .Bool ("mount-inotify" , false , commentPrefix + "Enable inotify for mounts" )
56
56
57
- flags .StringSlice ("network" , nil , commentPrefix + "additional networks, e.g., \" vzNAT\" or \" lima:shared\" to assign vmnet IP" )
57
+ flags .StringSlice ("network" , nil , commentPrefix + "Additional networks, e.g., \" vzNAT\" or \" lima:shared\" to assign vmnet IP" )
58
58
_ = cmd .RegisterFlagCompletionFunc ("network" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
59
59
// TODO: retrieve the lima:* network list from networks.yaml
60
60
return []string {"lima:shared" , "lima:bridged" , "lima:host" , "lima:user-v2" , "vzNAT" }, cobra .ShellCompDirectiveNoFileComp
61
61
})
62
62
63
- flags .Bool ("rosetta" , false , commentPrefix + "enable Rosetta (for vz instances)" )
63
+ flags .Bool ("rosetta" , false , commentPrefix + "Enable Rosetta (for vz instances)" )
64
64
65
- flags .String ("set" , "" , commentPrefix + "modify the template inplace, using yq syntax" )
65
+ flags .String ("set" , "" , commentPrefix + "Modify the template inplace, using yq syntax" )
66
66
67
67
// negative performance impact: https://gitlab.com/qemu-project/qemu/-/issues/334
68
- flags .Bool ("video" , false , commentPrefix + "enable video output (has negative performance impact for QEMU)" )
68
+ flags .Bool ("video" , false , commentPrefix + "Enable video output (has negative performance impact for QEMU)" )
69
69
}
70
70
71
71
// RegisterCreate registers flags related to in-place YAML modification, for `limactl create`.
72
72
func RegisterCreate (cmd * cobra.Command , commentPrefix string ) {
73
73
registerEdit (cmd , commentPrefix )
74
74
flags := cmd .Flags ()
75
75
76
- flags .String ("arch" , "" , commentPrefix + "machine architecture (x86_64, aarch64, riscv64, armv7l, s390x)" ) // colima-compatible
76
+ flags .String ("arch" , "" , commentPrefix + "Machine architecture (x86_64, aarch64, riscv64, armv7l, s390x)" ) // colima-compatible
77
77
_ = cmd .RegisterFlagCompletionFunc ("arch" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
78
78
return []string {"x86_64" , "aarch64" , "riscv64" , "armv7l" , "s390x" }, cobra .ShellCompDirectiveNoFileComp
79
79
})
@@ -83,17 +83,17 @@ func RegisterCreate(cmd *cobra.Command, commentPrefix string) {
83
83
return []string {"user" , "system" , "user+system" , "none" }, cobra .ShellCompDirectiveNoFileComp
84
84
})
85
85
86
- flags .Float32 ("disk" , 0 , commentPrefix + "disk size in GiB" ) // colima-compatible
86
+ flags .Float32 ("disk" , 0 , commentPrefix + "Disk size in GiB" ) // colima-compatible
87
87
_ = cmd .RegisterFlagCompletionFunc ("memory" , func (* cobra.Command , []string , string ) ([]string , cobra.ShellCompDirective ) {
88
88
return []string {"10" , "30" , "50" , "100" , "200" }, cobra .ShellCompDirectiveNoFileComp
89
89
})
90
90
91
- flags .String ("vm-type" , "" , commentPrefix + "virtual machine type (qemu, vz)" ) // colima-compatible
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
94
94
})
95
95
96
- flags .Bool ("plain" , false , commentPrefix + "plain mode. Disable mounts, port forwarding, containerd, etc." )
96
+ flags .Bool ("plain" , false , commentPrefix + "Plain mode. Disables mounts, port forwarding, containerd, etc." )
97
97
}
98
98
99
99
func defaultExprFunc (expr string ) func (v * flag.Flag ) (string , error ) {
0 commit comments