As I said in the post prior to this, I have really been enjoying using Terminal for accessing MySQL databases. I found a problem with it though. If you have a table with a lot of columns, or a column with a lot of data in it, Terminal will wrap the results of your query making it almost completely unreadable (or a pain to read at best).
I found a work-around. Though it isn’t as good as it could be, it does work. It prevents the wrap, but, everything beyond the right-side of your terminal window is completely removed. It doesn’t give you a scroll bar to see beyond, it is literally gone. If you try to resize your window, you’ll just get blank space.
Why Terminal doesn’t have the ability to turn it on or off is a mystery to me. But, that said, this fix does have it’s place, and it is fairly easy to turn on and off. Here’s what you do:
Open this file: $YOURHOME/.bashrc and place the following in there and save it:
# Wordwrap off
echo -e "\e[?7l\c"
After it is saved, you can close Terminal and re-open it, or restart bash with this command:
To turn it off again, just remove or comment out the echo statement you added to .bashrc and restart bash again.
If you have any better suggestions for this, please let me know! I’d love to have a better solution.