You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO(thaJeztah): add descriptions, and enable descriptions for our completion scripts (cobra.CompletionOptions.DisableDescriptions is currently set to "true")
16
-
varallLinuxCapabilities= []string{
17
-
"ALL", // magic value for "all capabilities"
18
-
19
-
// caps35 is the caps of kernel 3.5 (37 entries)
20
-
"CAP_CHOWN", // 2.2
21
-
"CAP_DAC_OVERRIDE", // 2.2
22
-
"CAP_DAC_READ_SEARCH", // 2.2
23
-
"CAP_FOWNER", // 2.2
24
-
"CAP_FSETID", // 2.2
25
-
"CAP_KILL", // 2.2
26
-
"CAP_SETGID", // 2.2
27
-
"CAP_SETUID", // 2.2
28
-
"CAP_SETPCAP", // 2.2
29
-
"CAP_LINUX_IMMUTABLE", // 2.2
30
-
"CAP_NET_BIND_SERVICE", // 2.2
31
-
"CAP_NET_BROADCAST", // 2.2
32
-
"CAP_NET_ADMIN", // 2.2
33
-
"CAP_NET_RAW", // 2.2
34
-
"CAP_IPC_LOCK", // 2.2
35
-
"CAP_IPC_OWNER", // 2.2
36
-
"CAP_SYS_MODULE", // 2.2
37
-
"CAP_SYS_RAWIO", // 2.2
38
-
"CAP_SYS_CHROOT", // 2.2
39
-
"CAP_SYS_PTRACE", // 2.2
40
-
"CAP_SYS_PACCT", // 2.2
41
-
"CAP_SYS_ADMIN", // 2.2
42
-
"CAP_SYS_BOOT", // 2.2
43
-
"CAP_SYS_NICE", // 2.2
44
-
"CAP_SYS_RESOURCE", // 2.2
45
-
"CAP_SYS_TIME", // 2.2
46
-
"CAP_SYS_TTY_CONFIG", // 2.2
47
-
"CAP_MKNOD", // 2.4
48
-
"CAP_LEASE", // 2.4
49
-
"CAP_AUDIT_WRITE", // 2.6.11
50
-
"CAP_AUDIT_CONTROL", // 2.6.11
51
-
"CAP_SETFCAP", // 2.6.24
52
-
"CAP_MAC_OVERRIDE", // 2.6.25
53
-
"CAP_MAC_ADMIN", // 2.6.25
54
-
"CAP_SYSLOG", // 2.6.37
55
-
"CAP_WAKE_ALARM", // 3.0
56
-
"CAP_BLOCK_SUSPEND", // 3.5
57
-
58
-
// caps316 is the caps of kernel 3.16 (38 entries)
59
-
"CAP_AUDIT_READ",
60
-
61
-
// caps58 is the caps of kernel 5.8 (40 entries)
62
-
"CAP_PERFMON",
63
-
"CAP_BPF",
64
-
65
-
// caps59 is the caps of kernel 5.9 (41 entries)
66
-
"CAP_CHECKPOINT_RESTORE",
67
-
}
20
+
// TODO(thaJeztah): consider what casing we want to use for completion (see below);
21
+
//
22
+
// We need to consider what format is most convenient; currently we use the
23
+
// canonical name (uppercase and "CAP_" prefix), however, tab-completion is
24
+
// case-sensitive by default, so requires the user to type uppercase letters
25
+
// to filter the list of options.
26
+
//
27
+
// Bash completion provides a `completion-ignore-case on` option to make completion
28
+
// case-insensitive (https://askubuntu.com/a/87066), but it looks to be a global
29
+
// option; the current cobra.CompletionOptions also don't provide this as an option
30
+
// to be used in the generated completion-script.
31
+
//
32
+
// Fish completion has `smartcase` (by default?) which matches any case if
33
+
// all of the input is lowercase.
34
+
//
35
+
// Zsh does not appear have a dedicated option, but allows setting matching-rules
0 commit comments