 |
|
 |
|
|
 |
Entering long command does not wrap line |
 |
 |
|
|
09-28-04 08:32 AM
When I type a long command into any terminal, the text I am typing
does not wrap to the next line. Instead, it overwrites the text on the
current line. The command is still runnable, but it is hard to look at
the whole thing at once.
The problem happens with all X-based terminal programs, and also
outside of X. This makes it look like a system problem instead of a
problem with one program.
Could this be related to the terminfo files? I have poked around in
the man pages for this, but nothing looks promising. Besides, I don't
know how to recompile these files.
I am running Debian/Unstable on an AMD.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Entering long command does not wrap line |
 |
 |
|
|
09-28-04 08:32 AM
On Mon, 27 Sep 2004 20:03:33 -0700, javacrypto wrote:
> When I type a long command into any terminal, the text I am typing
> does not wrap to the next line. Instead, it overwrites the text on the
> current line. The command is still runnable, but it is hard to look at
> the whole thing at once.
>
> The problem happens with all X-based terminal programs, and also
> outside of X. This makes it look like a system problem instead of a
> problem with one program.
>
> Could this be related to the terminfo files? I have poked around in
> the man pages for this, but nothing looks promising. Besides, I don't
> know how to recompile these files.
>
> I am running Debian/Unstable on an AMD.
It could be related to terminfo. You haven't told us which shell you are
using, (it is probably 'bash' as you are on Debian, but it could be tcsh,
ksh, rc, etc).
What is the value of the TERM environment variable?
Do you have an file ~/.inputrc ?
Do you have a prompt set? Does it have any escape sequences in it e.g. to
set the title of the xterm (or whatever you are using)?
Try the following (all on one line)
PS1='$ ' INPUTRC=/dev/null bash --noprofile --login
and see if it works any better. If so, then it could be your prompt (the
PS1 variable), or one of these files ~/.inputrc, /etc/inputrc,
/etc/profile, ~/.bash_profile, ~/.bash_login or ~/.profile
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Entering long command does not wrap line |
 |
 |
|
|
10-03-04 02:13 AM
> It could be related to terminfo. You haven't told us which shell you are
> using, (it is probably 'bash' as you are on Debian, but it could be tcsh,
> ksh, rc, etc).
I am using bash as the shell.
> What is the value of the TERM environment variable?
TERM = xterm
> Do you have an file ~/.inputrc ?
No. I will look that up and see that I need to put there.
> Do you have a prompt set? Does it have any escape sequences in it e.g. to
> set the title of the xterm (or whatever you are using)?
The current prompt is:
\[\033[0;36m\]\u:\W\$\033[0m\]
I don't know what any of that means any more. I'll look that up too.
> Try the following (all on one line)
>
> PS1='$ ' INPUTRC=/dev/null bash --noprofile --login
>
> and see if it works any better. If so, then it could be your prompt (the
> PS1 variable), or one of these files ~/.inputrc, /etc/inputrc,
> /etc/profile, ~/.bash_profile, ~/.bash_login or ~/.profile
Setting the prompt like you suggest fixes the problem. I'll look up
how the PS* variables are supposed to be set, and pick something sane.
Thanks for the help. I did not know where to look to troubleshoot this
problem.
Chris
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Entering long command does not wrap line |
 |
 |
|
|
10-03-04 02:13 AM
Thanks to your message, I figured it out. I caused the problem myself
by trying to read.
I read the Bash Prompt HOW-TO, and found the suggestion to make a PS1
like this:
PS1='\[\033[1;33m\]>\[\033[0m\] '
This gives a colored prompt.
Here is the line I put into .bashrc:
PS1='\[\033[0;36m\]\u:\W\$\033[0m\] '
I added the user, working dir, and the \$ which changes the symbol to
# if the user is root. Note, however, that I missed '\[' after the $.
This screws up the line-wrapping.
Here is the line I am going to use:
PS1='\[\033[0;36m\]\u:\W\$\[\033[0m\] '
That's what I get for reading. It's funny, though. I must have set
this a long time ago, but only notice the problem recently. Hmm.
Chris
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Entering long command does not wrap line |
 |
 |
|
|
10-04-04 11:01 PM
Thanks to your message, I figured it out. I caused the problem myself
by trying to read.
I read the Bash Prompt HOW-TO, and found the suggestion to make a PS1
like this:
PS1='\[\033[1;33m\]>\[\033[0m\] '
This gives a colored prompt.
Here is the line I put into .bashrc:
PS1='\[\033[0;36m\]\u:\W\$\033[0m\] '
I added the user, working dir, and the \$ which changes the symbol to
# if the user is root. Note, however, that I missed '\[' after the $.
This screws up the line-wrapping.
Here is the line I am going to use:
PS1='\[\033[0;36m\]\u:\W\$\[\033[0m\] '
That's what I get for reading. It's funny, though. I must have set
this a long time ago, but only notice the problem recently. Hmm.
Chris
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 12:08 PM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|