15

Is there any way at all to use the mouse cursor to move the cursor in terminal, like click where you want it and press a key to move it there?

This is one of the most annoying things I've ever found using the terminal

I know Ctrl+A will move to the beginning of the line but sometimes these commands are so long

20

Try option-click, that is, click with option pressed.

This works on the command line and also in screen editors, such as vi and nano.

option-click just sends the appropriate escape sequences to move the cursor to anywhere in the terminal screen. (To see this working, try it with cat.)

  • Didn't know that, wonder if there is a way to make this work in iTerm. – Gerry May 30 '12 at 10:42
  • 2
    @Gerry, ah, finally a feature that Terminal has that iTerm hasn't! – lhf May 30 '12 at 10:58
  • @Gerry, see Option + click in iTerm. – lhf May 30 '12 at 14:02
  • 1
    This doesn't seem to work for me? Im holding the option button and then clicking on a specific position but instead of taking me to that position it will load the previously ran command!? Im using yosemite and a 2015 macbook pro. – James111 Aug 26 '15 at 1:23

You must log in to answer this question.

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