Skip to content

Commit e44cf0c

Browse files
committed
Wrap output to terminal width
1 parent ea41590 commit e44cf0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chatgpt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ while $running; do
324324
handle_error "$response"
325325
response_data=$(echo "$response" | jq -r '.choices[].message.content')
326326

327-
echo -e "${CHATGPT_CYAN_LABEL}${response_data}"
327+
echo -e "${CHATGPT_CYAN_LABEL}${response_data}" | fold -s -w $COLUMNS
328328

329329
escaped_response_data=$(echo "$response_data" | sed 's/"/\\"/g')
330330
add_assistant_response_to_chat_message "$chat_message" "$escaped_response_data"

0 commit comments

Comments
 (0)