Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In bash windows using the Terminal.app on OS X Lion, I can no longer use ctrl + A as a shortcut for going to the start of the command line. Other ctrl characters like ctrl + E don't work any longer either.

Any ideas?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

^A and ^E are commands of bashs "emacs mode". Check your bash settings with

set -o

and verify that emacs is set to on. If your bash is in vi-mode (vi on) then you need to use the vi shortcuts to navigate within the row (ESC to leave insert mode, 0 to go to the beginning and $ to go to the end).

share|improve this answer
3  
You should also note that to switch it back to emacs mode, do set -o emacs –  Austin Hyde Jul 29 '11 at 18:58

If you want your setting to persist between sessions, add the following to your ~/.profile.

set -o vi
set -o emacs

Of course, you should only add one of those two, depending on your preferred editing mode.

share|improve this answer

Check to see the keyboard settings of your current theme. Terminal > Preferences > Settings > Keyboard.

If you don't see what you want in there try making a new theme to see if it works

share|improve this answer
    
I just verified, and they do seem to be working on my 10.7 box, so I think it must have something to do with the theme that you're using. –  bswinnerton Jul 29 '11 at 15:12
    
Yup. These are the most basic bash shortcuts and should definitely work at least in Bash. There should be no keyboard shortcuts set, actually, so "If you don't see what you want in there" is the default case and nothing to worry about. –  slhck Jul 29 '11 at 15:14
    
Mine continues to work after the 10.7 update. Actually works in all apps that i've tested it in... –  peelman Jul 29 '11 at 15:20
    
Check your general keyboard shortcuts as well to make sure you don't have anything overwriting your ctrl shortcuts. System Preferences > Keyboard > Keyboard Shortcuts –  bswinnerton Jul 29 '11 at 15:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.