mirror of
https://github.com/sigoden/aichat
synced 2024-11-08 13:10:28 +00:00
11 lines
242 B
Bash
11 lines
242 B
Bash
_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 |