hl.permission¶
- hl.permission(binary, type, mode)¶
Add a dynamic permission rule.
Signature¶
hl.permission(binary: string, type: string, mode: string): nil
hl.permission(spec: HL.PermissionSpec): nil
Parameters¶
- binarystring
Binary name or target. Must not be empty.
- typestring
Permission type.
Accepted values:
screencopycursorpospluginkeyboardkeebalias forkeyboard
- modestring
Permission mode.
Accepted values:
askallowdeny
- spec
HL.PermissionSpec Table form.
binarymay also be written astarget.
Returns¶
- nil
This function registers the permission rule and does not return a value.
Examples¶
Positional form:
hl.permission("grim", "screencopy", "allow")
Table form:
hl.permission({
binary = "my-plugin",
type = "plugin",
mode = "ask",
})
See also¶
HL.PermissionSpecTable form accepted by this function.