mirror of
https://github.com/shokinn/.files.git
synced 2026-09-22 19:14:44 +00:00
18 lines
514 B
Text
18 lines
514 B
Text
#compdef mocker
|
|
|
|
#
|
|
# {{@@ header() @@}}
|
|
#
|
|
|
|
# Load the completion generated by Mocker itself on first use. Keeping this as
|
|
# a small shim means the available commands and flags always match the installed
|
|
# Mocker version without adding its completion-generation cost to shell startup.
|
|
_mocker() {
|
|
local completion_script
|
|
|
|
completion_script="$(command mocker --generate-completion-script zsh 2>/dev/null)" || return 1
|
|
[[ -n "${completion_script}" ]] || return 1
|
|
|
|
eval "${completion_script}"
|
|
_mocker "$@"
|
|
}
|