Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Make the forward delete key work in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make the forward delete key work in Terminal
Authored by: tbdavis on Jun 10, '05 04:08:01PM

Under bash, the CTRL-d key functions as DELETE (when there are characters on the line) and as END-OF-FILE (when there are no other characters). The problem is that if you delete all of the characters, you will close that shell.

Another option is to use the bash NEXT-CHARACTER and BACKSPACE combinations: CTRL-f BACKSPACE. The problem with this is that when you get to the end of the line, you will still delete the previousl character.



[ Reply to This | # ]
Make the forward delete key work in Terminal
Authored by: pauljlucas on Jun 10, '05 05:50:17PM

Not in my bash it doesn't. To get characters on the line, you have to type something. To get characters in front of the cursor, you have to exit vi insert mode by pressing escape. You then have to move back a few characters. Then when I type Control-D, it enters the command and doesn't delete anything.

---
- Paul



[ Reply to This | # ]
Make the forward delete key work in Terminal
Authored by: Anonymous on Dec 22, '06 09:29:46AM

The best solution in this vein that I've worked out is to use the key combination space, control-T, backspace, backspace. That inserts a space, transposes the space and the next character while moving the cursor forward, then two backspaces delete the two. When you're at the end of a line, this doesn't produce a bell sound/flash like control-F, control-H does.



[ Reply to This | # ]