LinuxQuestions.org
Visit the LQ Articles and Editorials section
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, 01:14 PM   #1
sharky
Member
 
Registered: Oct 2002
Posts: 404

Rep: Reputation: 37
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, 03:32 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
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, 06:47 PM   #3
sharky
Member
 
Registered: Oct 2002
Posts: 404

Original Poster
Rep: Reputation: 37
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, 07:22 PM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

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

Original Poster
Rep: Reputation: 37
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:25 PM
getting back to GUI from command line lexx11 Linux - Newbie 7 03-25-2006 04:43 PM
How to get back into command line interface bonniehandi Linux - Newbie 1 11-19-2005 01:07 AM
Going back to the command line? Mathiasdm Debian 5 02-10-2005 03:55 PM
Command line runs back on itself SharpyWarpy Linux - General 2 11-25-2003 07:56 PM


All times are GMT -5. The time now is 01:54 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration