summaryrefslogtreecommitdiffstats
path: root/scripts/shell-integration/integration.zsh
blob: 2328bd6ab0182abd5b5a6ddc47ba90f058b56d15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
_aichat_zsh() {
    if [[ -n "$BUFFER" ]]; then
        local _old=$BUFFER
        BUFFER+="⌛"
        zle -I && zle redisplay
        BUFFER=$(aichat -e "$_old")
        zle end-of-line
    fi
}
zle -N _aichat_zsh
bindkey '\ee' _aichat_zsh