1833762 Members
2688 Online
110063 Solutions
New Discussion

@ sign deletes the line

 
SOLVED
Go to solution
Asya
Regular Advisor

@ sign deletes the line

Hello,

I have a rather weird problem. When i'm typing something on the command line, and it includes @, it deletes the line. If i'm typing it in the file, it jumps to the beginning of the line.

I know there is a way to avoid it, but can't remember what keys need to be pressed to avoid this problem.

Thank you!
5 REPLIES 5
harry d brown jr
Honored Contributor
Solution

Re: @ sign deletes the line



WHat does

stty -a

return?

it's probably "kill"

set it to:

stty kill ^U

live free or die
harry d brown jr
Live Free or Die
Asya
Regular Advisor

Re: @ sign deletes the line

At first, it did say kill = @
after following your instructions..same problem...

this is what stty -a looks like now.

Thanks!

speed 300 baud; line = 0;
rows = 24; columns = 80
min = 1; time = 1;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts
-ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo -echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
David de Beer
Valued Contributor

Re: @ sign deletes the line


Asya,

> eol = ^@;

Here is your problem.

Change eol to something else:

stty eol

That will solve your problem.

Regards,
David de Beer.
Peter Godron
Honored Contributor

Re: @ sign deletes the line

Asya,
also, once the initial problem is fixed, find out where the stty came from in the first place (~/.profile or /etc/profile perhaps) and correct it there as well, otherwise the problem returns on next login.
Regards
Asya
Regular Advisor

Re: @ sign deletes the line

Thank you all of the help.

The problem was actually me running bash on top of another shell and it wasn't recognizing stty kill ^U command. After i did exec bash from the shell instead, everything worked fine.

Thanks again!