Sorry if the title is confusing but essentially what I want is to have standard text editor features like Command< to move to the beginning of the line or CommandShiftBackspace to erase a line. Is it possible to implement such stuff in the terminal interface? Preferably, I would not download a terminal emulator like iTerm etc..

There are ways to navigate in the terminal but they don't use the macOS keystrokes for navigation as the BASH shell actually predate macOS/NeXT. For example CtrlA moves to the beginning of a line and CtrlE moves the cursor to the end of a line. A quick search online on BASH shell keyboard shortcuts will yield a whole list like this, for example.

As an alternative BBEdit is a text editor that has been around on the Mac for ever. Way Pre-OS X. And one of the features is a command line window that acts much like a text editor and uses the standard Mac keybindings. But then you'll have to buy a programmers text editor to get the features you want in a shell window.

Might be best if you just learn the BASH keybindings, as that is lots cheaper ;-)

  • thanks for pointing me in the right direction as I actually had no idea that what I wanted was even easily available... but the more you know!! I will look into what you said – Abby Aug 10 at 22:18
  • Incidentally, quite a few of these key bindings will work in macOS text input fields as well. – duskwuff Aug 11 at 1:19
  • 1
    NeXT is older than bash. Most shells have these keystrokes. Also note that until OSX 10.3ish bash was not the shell it was csh. The keystrokes come from NeXT they are actually emacs keybindings – Mark Aug 11 at 11:04
  • @mark While NeXT may or may not have used emacs keybindings, the Mac itself has always used them. They didn't come from NeXT. – Marc Wilson Aug 11 at 15:58
  • 1
    @MarcWilson Early Classic Mac keyboard does not have a control key so can't have the emacs shortcuts en.wikipedia.org/wiki/Apple_Keyboard#/media/… – Mark Aug 11 at 19:11

Apple has the complete (AFAIK) set of Terminal Keyboard shortcuts on their support website. It seems thay cover at least some of what you're looking for. THere's also an expanded set of topics relating to various aspects of terminal use that should be helpful.

  • It's not complete, a number of the emacs readline keybindings are lacking (c-p, c-n, c-t, c-y, …) – Kevin Aug 11 at 1:14
  • 1
    well, it's complete enough :p – Abby Aug 11 at 9:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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