Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Shell-GPT integration ZSH v0.1
- _sgpt_zsh() {
- if [[ -n "$BUFFER" ]]; then
- _sgpt_prev_cmd=$BUFFER
- BUFFER+="X "
- zle -I && zle redisplay
- BUFFER=$(sgpt --shell <<< "$_sgpt_prev_cmd")
- zle end-of-line
- fi
- }
- zle -N _sgpt_zsh
- bindkey '^l' _sgpt_zsh
- # Shell-GPT integration ZSH v0.1
Advertisement
Add Comment
Please, Sign In to add comment