Skip to content

Commit 9598414

Browse files
authored
Merge pull request #75 from nre-ableton/nre/main/wrap-output
Wrap output to terminal width
2 parents ea41590 + e44cf0c commit 9598414

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)