pastywhiteacct

shell_gpt-warp-issue

Jan 18th, 2024
1,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | Source Code | 0 0
  1. # Shell-GPT integration ZSH v0.1
  2. _sgpt_zsh() {
  3. if [[ -n "$BUFFER" ]]; then
  4.     _sgpt_prev_cmd=$BUFFER
  5.     BUFFER+="X "
  6.     zle -I && zle redisplay
  7.     BUFFER=$(sgpt --shell <<< "$_sgpt_prev_cmd")
  8.     zle end-of-line
  9. fi
  10. }
  11. zle -N _sgpt_zsh
  12. bindkey '^l' _sgpt_zsh
  13. # Shell-GPT integration ZSH v0.1
Advertisement
Add Comment
Please, Sign In to add comment