Gmane
From: Thomas Achtemichuk <tom <at> tomchuk.com>
Subject: Re: anoying terminal
Newsgroups: gmane.linux.gentoo.user
Date: 2003-12-04 18:49:19 GMT (5 years, 30 weeks, 2 days, 15 hours and 44 minutes ago)

On 12/04/03 11:05:43, Helder Rossa wrote:
> my terminal in gnome when I'm writing a command bigger than the console
> size it wraps the text to the same line that i was witting on :-S .

By default bash doesn't check it's window size after every command. The  
good thing is that you can make it. Add "shopt -s checkwinsize" to your
~/.bashrc or /etc/profile. Works like a charm.

To reproduce the "error":
man bash
resize the window
quit, and type a long string at the prompt.

It will wrap at the window's original width and wrap onto the same line.
echo "shopt -s checkwinsize" >> ~/.bashrc (or /etc/profile)
source ~/.bashrc
try again

It works correctly!

In my opinion this is something (along with a decent PS1) that should be  
added to the default /etc/profile or /etc/skel/.bashrc and the user should  
never have to set by themselves.

-- 
Thanks,
Thomas Achtemichuk

-------------------------------------------------------------------------------
Speaking of purchasing a dog, never buy a watchdog that's on sale.
After all, everyone knows a bargain dog never bites!
-------------------------------------------------------------------------------

--
gentoo-user <at> gentoo.org mailing list