Update chatgpt.sh

Add support for kitty icat image preview on kitty terminal.
This commit is contained in:
Rex Ackermann 2023-03-26 12:01:51 +06:00 committed by GitHub
parent a6f6c20022
commit 3860335207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,6 +255,10 @@ while $running; do
curl -sS $image_url -o temp_image.png
imgcat temp_image.png
rm temp_image.png
elif [[ "$TERM" == "xterm-kitty" ]]; then
curl -sS $image_url -o temp_image.png
kitty +kitten icat temp_image.png
rm temp_image.png
else
echo "Would you like to open it? (Yes/No)"
read -e answer