MacOS – How to forward delete in Macports

bashcommand linemacosmacportsterminal

When using the interactive Macports shell (running port), is there a way to delete characters to the right of the cursor?

Normally, you can simply use key the combination Fn + Delete to forward-delete. However, when this is used, the result is the production of a ~ (tilde) character.

My bash version is: GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin11). My Macports version is: Version: 2.5.4. My OS X version is: 10.7.5 Lion.

 

UPDATE: As mentioned by daniel Azuelos, control+d will delete forwards one character at a time. However, this is dangerous – if there is no text to be deleted, it will exit the interactive shell as well as the terminal (at least using bash).

Best Answer

I didn't test it with Lion, but there is a high probability that control+d would delete the character to the right of the cursor, and control+k would delete everything to the end of line.