Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Turning on line wrapping in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Turning on line wrapping in Terminal
Authored by: babbage on Feb 16, '05 11:41:39AM

Rob wrote...

Note that I have wrapped the lines by hand -- they're actually really wide single lines. If you don't set your Terminal window *really* wide, though, you won't see all the output; it gets chopped with a $ symbol. Is there a "wrap" option on grep that I'm not aware of?

You can change this behavior in Terminal itself. Click on the Terminal menu item, then Window Settings..., and a dialog window will pop up. In the dropdown widget at the top of the window, select Buffer, then in the Scrollback section check the box next to Wrap lines that are too long. While you're here, you may also want to check the boxes next to Rewrap lines on window resize and Scroll to bottom on input.

It should possible to get the same result with the defaults command:

defaults write com.apple.Terminal Autowrap YES
defaults write com.apple.Terminal Backwrap YES
defaults write com.apple.Terminal RewrapOnResize YES

Hope this helps!

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

Turning on line wrapping in Terminal
Authored by: babbage on Feb 16, '05 11:45:18AM

Oh and, in case it isn't clear, after changing settings for a window in the dialog box, push the Use Settings as Defaults button to make the change permanent for new windows.

This probably won't take effect for other currently open windows, though I haven't tested that yet. New windows will have the new setting, so opening new windows or relaunching Terminal will make the changes available.

The same constraint applies to the defaults command as well -- you'll need to open new windows or restart Terminal for it to work.

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

Turning on line wrapping in Terminal
Authored by: chrisale on Feb 16, '05 11:48:24AM

What I like to do if I get a result from a Terminal command that is either really long, or all on one line.. I just "pipe it" to a file.

So, for this command I do:

ioreg -l >> ioreg.txt

Which dumps everything into that text file (in the current directory), then I can read it much more easily, search it, save it ect. Works great for man pages too.



[ Reply to This | # ]
Turning on line wrapping in Terminal
Authored by: chrisale on Feb 16, '05 11:56:18AM

Oh, I wanted to put up my result from ioreg... it's no wonder my battery doesn't hold a charge anymore! My TiBook is showing 100% capacity!

"IOBatteryInfo" = ({"Capacity"=176,"Amperage"=0,"Cycle Count"=299,"Current"=176,"Voltage"=16386,"Flags"=838860805,"AbsoluteMaxCapacity"=3600})

Is there any way to "fool" the computer or the battery into thinking the Capacity is actually somewhre close to the "AbsoluteMax?"



[ Reply to This | # ]
Turning on line wrapping in Terminal
Authored by: Puzo on Feb 16, '05 12:43:39PM

For reference, if anyone is interested, I have this:
"Capacity"=5370
"Amperage"=18446744073709549742 (when power is plugged in, the amperage is 0)
"Cycle Count"=31
"Current"=5203
"Voltage"=12263
"Flags"=4 (when power is plugged in, the flags value is 1090519045)
"AbsoluteMaxCapacity"=5400

(PBook G4 1.5G 17")



[ Reply to This | # ]
Turning on line wrapping in Terminal
Authored by: ephramz on Feb 16, '05 12:18:02PM
Hmm, I have all these settings turned on in my Window Settings/Buffer but ioreg and other commands like ps -ax still spit out lines that are too long, not wrapped, and end with a '$'. I even set these as the default and still no luck. Any ideas?

[ Reply to This | # ]
Turning on line wrapping in Terminal
Authored by: pediddle on Feb 16, '05 01:14:56PM

Use "ioreg -l -w 0" (that's a zero) to disable the stupid truncating with the $.

God only knows why Apple would design a non-interactive program to destroy it's output by default...



[ Reply to This | # ]
Turning on line wrapping in Terminal
Authored by: zojas on Feb 16, '05 01:51:26PM

use 'ps axww' instead, then ps won't truncate its output. (I typically add the 'u' flag too, but I don't remember why)



[ Reply to This | # ]
Turning on line wrapping in Terminal
Authored by: u2mr2os2 on Feb 17, '05 01:30:42AM

I'm amazed that you took the time to write all that about the Terminal settings but didn't bother to test it to find out it doesn't solve the problem.



[ Reply to This | # ]