You are not logged in.

#1 2006-05-31 08:07:54

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Prompt gets screwed when issuing long command

Hello,
i've noticed that every time i issue a long command the prompt-and the terminal in general-gets screwed up and it gets worse when i try to correct it with the arrow buttons.

I've tried both securecrt and putty and the same happens. I am using vt100 terminal emulation in both applications.

An example of how the terminal gets screwed:

e/tester ';'ia:~:503>find / -wholename '/tmp' -prune , -iname '*.doc' -execdir grep -q "grave" '{}' ; -print  -execdir cp '{}' /home
/home/tester/no-latin1.doc
/usr/share/kbd/keymaps/i386/qwerty/no-latin1.doc
root:egnatia:~:504>

The command i had issued is:

find / -wholename '/tmp' -prune , -iname '*.doc' -execdir grep -q "grave" '{}' ; -print  -execdir cp '{}' /home/tester ';'

Can somebody help me with that?

Offline

#2 2006-06-01 01:32:27

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Prompt gets screwed when issuing long command

It happens sometime here especially when I resize the terminal window. What I do to fix it, is to change the window size a bit (increase it a bit then decrease it to its original size) and it fixes by itself.

Offline

#3 2006-06-01 02:38:15

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: Prompt gets screwed when issuing long command

I have had this problem with Gnome Terminal since i have memory... i dont know why it isnt fixed yet. I usually end deleting the whole thing and maximizing the Terminal... not the best solution though.


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#4 2006-06-01 10:26:17

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

Thank you for the comments guys.
Actually i am facing this problem from a text environment, not graphical, X11, etc.

I am facing this problem whe connecting via SSH to the archlinux server.

Can it be a bug of bash?

I am asking that, because with the same terminal i am connecting to a Slackware server and i do not face any problem when issuing long commands.

EDIT: Actually i thing the wrapping fails, instead of continuing to the next line, it continues to the beginning of the same line, thus destroying the prompt and causing general malfunction to the terminal!

Offline

#5 2006-06-01 12:21:29

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Prompt gets screwed when issuing long command

If you want to test if it is a bug with bash, try with other shells and tell us how they do.

Offline

#6 2006-06-01 19:19:20

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Prompt gets screwed when issuing long command

In bash, run:

shopt -s checkwinsize

and try again.

Offline

#7 2006-06-01 21:05:32

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Prompt gets screwed when issuing long command

 reset

may work too

Offline

#8 2006-06-01 22:06:09

sweiss
Member
Registered: 2004-02-16
Posts: 635

Re: Prompt gets screwed when issuing long command

This also occurs in yakuake. A very annoying problem, that's for sure.

Offline

#9 2006-06-02 01:14:21

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: Prompt gets screwed when issuing long command

Well this is very interesting ... I copied and pasted this

find / -wholename '/tmp' -prune , -iname '*.doc' -execdir grep -q "grave" '{}' ; -print -execdir cp '{}' /home/tester ';'

which was indicated as the command that scews things up.
I did it in konsole and yakuake but nothing goes wrong. I'm using KDE, could the problem be related to Gnome?

Offline

#10 2006-06-02 06:57:55

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

ralvez wrote:

Well this is very interesting ... I copied and pasted this

find / -wholename '/tmp' -prune , -iname '*.doc' -execdir grep -q "grave" '{}' ; -print -execdir cp '{}' /home/tester ';'

which was indicated as the command that scews things up.
I did it in konsole and yakuake but nothing goes wrong. I'm using KDE, could the problem be related to Gnome?

Hello,
i am not using X or other GUI, just terminal emulators fron MS XP PRO (securecrt and putty).

Offline

#11 2006-06-02 06:58:39

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

Penguin wrote:
 reset

may work too

Had already tried, no luck, thanx however!

Offline

#12 2006-06-02 07:02:19

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

phrakture wrote:

In bash, run:

shopt -s checkwinsize

and try again.

No luck, thanx!

Offline

#13 2006-06-02 07:03:22

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

codemac wrote:

If you want to test if it is a bug with bash, try with other shells and tell us how they do.

Very good idea, will do!

EDIT: with csh and tcsh i don't have any problem at all! Only with bash!

Offline

#14 2006-06-04 14:48:33

antonis00
Member
From: Cyprus
Registered: 2004-05-30
Posts: 10

Re: Prompt gets screwed when issuing long command

123456789 wrote:
codemac wrote:

If you want to test if it is a bug with bash, try with other shells and tell us how they do.

Very good idea, will do!

EDIT: with csh and tcsh i don't have any problem at all! Only with bash!

The problem is probably with your prompt. Do you have a fancy prompt ?
make sure you enclose each escape sequence in your prompt within [ and ]

for example PS1=" [e[1;32m]my_prompt_text[e[1;32m][e[0m] $"

Offline

#15 2006-06-04 14:55:39

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

antonis00 wrote:
123456789 wrote:
codemac wrote:

If you want to test if it is a bug with bash, try with other shells and tell us how they do.

Very good idea, will do!

EDIT: with csh and tcsh i don't have any problem at all! Only with bash!

The problem is probably with your prompt. Do you have a fancy prompt ?
make sure you enclose each escape sequence in your prompt within [ and ]

for example PS1=" [e[1;32m]my_prompt_text[e[1;32m][e[0m] $"

Hello Antonis!
My prompt is:
PS1='[33[1;33m]u[33[0m]]:h:[33[1;33m]w[33[0m]]:!>$ '

However, with same prompt (and the same .bashrc) in Slackware it doesn't get screwed up!

Offline

#16 2006-06-04 15:15:29

antonis00
Member
From: Cyprus
Registered: 2004-05-30
Posts: 10

Re: Prompt gets screwed when issuing long command

There are mistakes in your prompt your prompt should be like this:

PS1='[33[1;33m]u[33[0m]:h:[33[1;33m]w[33[0m]:!>$ '

Try it everything should be fixed now !!!

Offline

#17 2006-06-04 15:37:33

123456789
Member
From: Greece
Registered: 2006-05-02
Posts: 21

Re: Prompt gets screwed when issuing long command

antonis00 wrote:

There are mistakes in your prompt your prompt should be like this:

PS1='[33[1;33m]u[33[0m]:h:[33[1;33m]w[33[0m]:!>$ '

Try it everything should be fixed now !!!

You are GREAT!
Thank you very much!

I had two mistakes in the prompt...everything works fine now!

Regards from Thessaloniki!

Offline

Board footer

Powered by FluxBB