aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zfunc/_kitty
blob: 15918b5bdf4460d63939c11cba60da1836496ee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
autoload -Uz compinit
compinit

_kitty() {
    local src
    # Send all words up to the word the cursor is currently on
    src=$(printf "%s
" "${(@)words[1,$CURRENT]}" | kitty +complete zsh)
    if [[ $? == 0 ]]; then
        eval ${src}
    fi
}
compdef _kitty kitty