first commit
This commit is contained in:
commit
0610f4aeab
130 changed files with 9897 additions and 0 deletions
32
fn/-z4h-complete-kitty
Normal file
32
fn/-z4h-complete-kitty
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
local kitty="${commands[kitty]-}"
|
||||
local orig_cmd="${_comps[kitty]-}"
|
||||
local comp="$Z4H"/cache/kitty-completion-$EUID.zsh
|
||||
local src="${kitty:h}"/../lib/kitty/kitty/complete.py
|
||||
local cmd
|
||||
|
||||
() {
|
||||
[[ -n "$kitty" ]] || return
|
||||
|
||||
[[ "$comp" -nt "$kitty" && (! -e "$src" || "$comp" -nt "$src" ) ]] || {
|
||||
local tmp="$comp".tmp."${sysparams[pid]}"
|
||||
"$kitty" + complete setup zsh >"$tmp" || return
|
||||
zf_mv -f -- "$tmp" "$comp" || return
|
||||
-z4h-compile "$comp" || return
|
||||
}
|
||||
|
||||
() {
|
||||
emulate -L zsh
|
||||
builtin source -- "$comp"
|
||||
} || true
|
||||
|
||||
cmd="${_comps[kitty]-}"
|
||||
[[ "$cmd" != "$orig_cmd" ]] || return
|
||||
} || {
|
||||
builtin unset '_comps[kitty]'
|
||||
_default "$@"
|
||||
return
|
||||
}
|
||||
|
||||
builtin eval "$cmd"
|
Loading…
Add table
Add a link
Reference in a new issue