0

Possible Duplicate:
How can I move around the bash commandline efficiently?

I asked the case of cmd.exe here. I want to ask the same question for Mac's Terminal/bash. I know some of the answers, but not everything.

With Terminal/bash, when something's wrong with what I typed? What edit option can I do? I can use arrow key to move cursor one by one, but it would be great if there's a key for

  • Move the cursor by the word not by character both directions (forward/backward)
  • Move the cursor to the start of line
    • I use Control-A
  • Move the cursor to the end of line
    • I use Control-E
  • Delete the word (not a character) under the cursor.
    • I use Escape-Delete key for this purpose.

Or, what would be other useful keys for editing?

1

2 Answers 2

1

Start 'Terminal'. On the Main Menu, select Help->Terminal Help->Shortcuts for Terminal. This will bring up a page describing the keyboard shortcuts that 'Terminal' understands. Additional information can be found by starting 'Terminal', then typing "info bash ", then typing "n" until you get to the section entitled "Command Line Editing". Happy reading...

1

Another great one at the Terminal is holding the option (a.k.a. alt) key and then clicking into the location you want to go back to.

When you hold down the option key you will see a + cursor to let you know that you have activated the feature.

Not the answer you're looking for? Browse other questions tagged .