LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-24-2009, 12:14 PM   #1
sharky
Member
 
Registered: Oct 2002
Posts: 569

Rep: Reputation: 84
back space erases whole term on command line


Have a problem with backspace on the command line. It backspaces over entire terms instead of single characters

Lets say I enter 'cd /home/$USER/.d5' when I meant to enter 'cd /home/$USER/.dt'. If I hit the backspace button to correct the last character everything is erased except the 'cd'. I have to retype the whole path and keep doing it until it's perfect. If I accidentally hit the backspace more than once it continues erasing whole terms rather than single characters.

Is there a way to turn off this 'feature'?
 
Old 04-24-2009, 02:32 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Hit Ctrl-v (hold down ctrl key then hit v). Then hit the backspace key. What you see should be the code the backspace key is sending. (Typically it is ^? or ^H).

Then type "stty -a" and see what "erase=" shows to determine if it matches.

If not then type "stty erase" and hit your backspace key - that should set it to match. You can hit stty -a afterwards to verify it.

Of course this assumes you're not using incorrect TERM value (echo $TERM to se that) or haven't done some odd mapping manually.
 
Old 04-24-2009, 05:47 PM   #3
sharky
Member
 
Registered: Oct 2002
Posts: 569

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by jlightner View Post
Hit Ctrl-v (hold down ctrl key then hit v). Then hit the backspace key. What you see should be the code the backspace key is sending. (Typically it is ^? or ^H).

Then type "stty -a" and see what "erase=" shows to determine if it matches.

If not then type "stty erase" and hit your backspace key - that should set it to match. You can hit stty -a afterwards to verify it.

Of course this assumes you're not using incorrect TERM value (echo $TERM to se that) or haven't done some odd mapping manually.
Thanks for the response.

Ctrl-v backspace returns ^?

partial return of stty -a:
Quote:
.
intr = ^c; quit = ^\; erase = ^h; kill = ^u;
rprnt = ^r; flush = ^o; werase = ^?; lnext = ^v;
$TERM is set to xterm.


If I enter 'stty erase' and then hit the backspace key it simply erases 'erase' on the command line. No change is affected.
 
Old 04-24-2009, 06:22 PM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Mention distro and shell.
Otherwise things will not be clear.
 
Old 04-27-2009, 12:28 PM   #5
sharky
Member
 
Registered: Oct 2002
Posts: 569

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by amani View Post
Mention distro and shell.
Otherwise things will not be clear.
Not a distro. It's Solaris. The shell is csh. Just discover that if I invoke tcsh the issues vanish. That might be the easiest workaround.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the Linux command line character for a blank space? Peter Shepard Red Hat 3 06-21-2006 06:25 PM
getting back to GUI from command line lexx11 Linux - Newbie 7 03-25-2006 03:43 PM
How to get back into command line interface bonniehandi Linux - Newbie 1 11-19-2005 12:07 AM
Going back to the command line? Mathiasdm Debian 5 02-10-2005 02:55 PM
Command line runs back on itself SharpyWarpy Linux - General 2 11-25-2003 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration