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