If the HTTP response body for a curl request doesn’t contain a trailing newline, I end up with this really annoying condition where the shell prompt is in the middle of the line, and escaping is messed up enough that when I put the last curl command on the screen, deleting characters from that curl command deletes the wrong characters.
For example:
[root@localhost ~]# curl jsonip.com
{"ip":"10.10.10.10","about":"/about"}[root@localhost ~]#
Is there a trick I can use to automatically add a newline at the end of a curl response, to get the prompt back on the left edge of the screen?