Skip to content

Commit 535812d

Browse files
author
Ma Shimiao
committed
add missed options for completion and sort them
Signed-off-by: Ma Shimiao <[email protected]>
1 parent 6210a30 commit 535812d

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

cmd/oci-runtime-tool/generate.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,32 @@ var generateFlags = []cli.Flag{
2020
cli.StringSliceFlag{Name: "args", Usage: "command to run in the container"},
2121
cli.StringSliceFlag{Name: "env", Usage: "add environment variable e.g. key=value"},
2222
cli.StringSliceFlag{Name: "env-file", Usage: "read in a file of environment variables"},
23-
cli.StringFlag{Name: "hostname", Usage: "hostname value for the container"},
2423
cli.StringSliceFlag{Name: "hooks-poststart", Usage: "set command to run in poststart hooks"},
2524
cli.StringSliceFlag{Name: "hooks-poststop", Usage: "set command to run in poststop hooks"},
2625
cli.StringSliceFlag{Name: "hooks-prestart", Usage: "set command to run in prestart hooks"},
26+
cli.StringFlag{Name: "hostname", Usage: "hostname value for the container"},
2727
cli.StringSliceFlag{Name: "label", Usage: "add annotations to the configuration e.g. key=value"},
2828
cli.StringFlag{Name: "linux-apparmor", Usage: "specifies the the apparmor profile for the container"},
2929
cli.StringFlag{Name: "linux-cgroups-path", Usage: "specify the path to the cgroups"},
30-
cli.Uint64Flag{Name: "linux-cpu-shares", Usage: "the relative share of CPU time available to the tasks in a cgroup"},
3130
cli.Uint64Flag{Name: "linux-cpu-period", Usage: "the CPU period to be used for hardcapping (in usecs)"},
3231
cli.Uint64Flag{Name: "linux-cpu-quota", Usage: "the allowed CPU time in a given period (in usecs)"},
32+
cli.Uint64Flag{Name: "linux-cpu-shares", Usage: "the relative share of CPU time available to the tasks in a cgroup"},
3333
cli.StringFlag{Name: "linux-cpus", Usage: "CPUs to use within the cpuset (default is to use any CPU available)"},
3434
cli.StringSliceFlag{Name: "linux-device-add", Usage: "add a device which must be made available in the container"},
3535
cli.StringSliceFlag{Name: "linux-device-remove", Usage: "remove a device which must be made available in the container"},
3636
cli.BoolFlag{Name: "linux-device-remove-all", Usage: "remove all devices which must be made available in the container"},
3737
cli.BoolFlag{Name: "linux-disable-oom-kill", Usage: "disable OOM Killer"},
38+
cli.StringSliceFlag{Name: "linux-gidmappings", Usage: "add GIDMappings e.g HostID:ContainerID:Size"},
3839
cli.StringSliceFlag{Name: "linux-hugepage-limits-add", Usage: "add hugepage resource limits"},
3940
cli.StringSliceFlag{Name: "linux-hugepage-limits-drop", Usage: "drop hugepage resource limits"},
40-
cli.StringSliceFlag{Name: "linux-gidmappings", Usage: "add GIDMappings e.g HostID:ContainerID:Size"},
4141
cli.StringSliceFlag{Name: "linux-masked-paths", Usage: "specifies paths can not be read inside container"},
4242
cli.Uint64Flag{Name: "linux-mem-kernel-limit", Usage: "kernel memory limit (in bytes)"},
4343
cli.Uint64Flag{Name: "linux-mem-kernel-tcp", Usage: "kernel memory limit for tcp (in bytes)"},
4444
cli.Uint64Flag{Name: "linux-mem-limit", Usage: "memory limit (in bytes)"},
4545
cli.Uint64Flag{Name: "linux-mem-reservation", Usage: "memory reservation or soft limit (in bytes)"},
46+
cli.StringFlag{Name: "linux-mems", Usage: "list of memory nodes in the cpuset (default is to use any available memory node)"},
4647
cli.Uint64Flag{Name: "linux-mem-swap", Usage: "total memory limit (memory + swap) (in bytes)"},
4748
cli.Uint64Flag{Name: "linux-mem-swappiness", Usage: "how aggressive the kernel will swap memory pages (Range from 0 to 100)"},
48-
cli.StringFlag{Name: "linux-mems", Usage: "list of memory nodes in the cpuset (default is to use any available memory node)"},
4949
cli.StringFlag{Name: "linux-mount-label", Usage: "selinux mount context label"},
5050
cli.StringSliceFlag{Name: "linux-namespace-add", Usage: "adds a namespace to the set of namespaces to create or join of the form 'ns[:path]'"},
5151
cli.StringSliceFlag{Name: "linux-namespace-remove", Usage: "removes a namespace from the set of namespaces to create or join of the form 'ns'"},

completions/bash/oci-runtime-tool

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,17 +291,17 @@ _oci-runtime-tool_generate() {
291291
--args
292292
--env
293293
--env-file
294-
--hostname
295294
--hooks-poststart
296295
--hooks-poststop
297296
--hooks-prestart
297+
--hostname
298298
--label
299299
--linux-apparmor
300300
--linux-cgroups-path
301-
--linux-cpu-shares
302301
--linux-cpu-period
303302
--linux-cpu-quota
304303
--linux-cpus
304+
--linux-cpu-shares
305305
--linux-device-add
306306
--linux-device-remove
307307
--linux-gidmappings
@@ -312,9 +312,9 @@ _oci-runtime-tool_generate() {
312312
--linux-mem-kernel-tcp
313313
--linux-mem-limit
314314
--linux-mem-reservation
315+
--linux-mems
315316
--linux-mem-swap
316317
--linux-mem-swappiness
317-
--linux-mems
318318
--linux-mount-label
319319
--linux-namespace-add
320320
--linux-namespace-remove
@@ -341,6 +341,8 @@ _oci-runtime-tool_generate() {
341341
--mount-bind
342342
--mount-cgroups
343343
--output
344+
--process-cap-add
345+
--process-cap-drop
344346
--process-cwd
345347
--process-gid
346348
--process-groups

0 commit comments

Comments
 (0)