5

I am curious as to whether there is an equivalent to the Alt-. command on Mac. On my computer it inserts the following character: ≥, instead of showing the preceding lines final parameter.

3

ESC + . inserts the last argument and is the direct equivalent to Alt + . on Linux

see https://apple.stackexchange.com/a/85152/31470

  • It's not exactly equivalent, because you can't for example press period twice while holding escape. The reason why using option as a meta key is disabled by default might be that many keyboard layouts have commonly used characters under option. – Lri Jun 3 '13 at 7:58
9

You have to change the Terminal’s behavior to the alt key acts as a meta key (like in X11 Terms). After you check that, everytime you press alt + ., you’ll get the last argument from the previous command. (You can repeat that command n times)

Terminal Preferences

  • That is pretty sweet. Is there any reason why I don't want to turn that option on? – Casebash Sep 10 '10 at 10:13
  • 1
    If you wanted to use the OS X extended characters, for example: alt + . = … or put a Copyright © (alt + c), you would have to find another way to do it, because your ALT key won’t cut it anymore ;) Other than that, if you work with the command line a lot, it’s a good idea to have it checked. – Martin Marconcini Sep 10 '10 at 11:25

You must log in to answer this question.

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