Skip to content

Commit 3860335

Browse files
authored
Update chatgpt.sh
Add support for kitty icat image preview on kitty terminal.
1 parent a6f6c20 commit 3860335

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

chatgpt.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ while $running; do
255255
curl -sS $image_url -o temp_image.png
256256
imgcat temp_image.png
257257
rm temp_image.png
258+
elif [[ "$TERM" == "xterm-kitty" ]]; then
259+
curl -sS $image_url -o temp_image.png
260+
kitty +kitten icat temp_image.png
261+
rm temp_image.png
258262
else
259263
echo "Would you like to open it? (Yes/No)"
260264
read -e answer

0 commit comments

Comments
 (0)