File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ while $running; do
292292 response_data=$( echo $response | jq -r ' .choices[].message.content' )
293293
294294 if [[ " $prompt " =~ ^command: ]]; then
295- echo -e " ${CHATGPT_CYAN_LABEL} ${response_data} \n "
295+ echo -e " ${CHATGPT_CYAN_LABEL} ${response_data} " | fold -s -w $COLUMNS
296296 dangerous_commands=(" rm" " >" " mv" " mkfs" " :(){:|:&};" " dd" " chmod" " wget" " curl" )
297297
298298 for dangerous_command in " ${dangerous_commands[@]} " ; do
@@ -344,7 +344,7 @@ while $running; do
344344 request_to_completions " $request_prompt "
345345 handle_error " $response "
346346 response_data=$( echo " $response " | jq -r ' .choices[].text' | sed ' 1,2d; s/^A://g' )
347- echo -e " ${CHATGPT_CYAN_LABEL}${response_data} "
347+ echo -e " ${CHATGPT_CYAN_LABEL}${response_data} " | fold -s -w $COLUMNS
348348
349349 if [ " $CONTEXT " = true ]; then
350350 escaped_response_data=$( echo " $response_data " | sed ' s/"/\\"/g' )
You can’t perform that action at this time.
0 commit comments