6

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.

2 Answers 2

5

ESC + . inserts the last argument, quite similar like Alt + . on Linux

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

1
  • 1
    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
    Commented Jun 3, 2013 at 7:58
10

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

2
  • That is pretty sweet. Is there any reason why I don't want to turn that option on?
    – Casebash
    Commented Sep 10, 2010 at 10:13
  • 2
    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. Commented Sep 10, 2010 at 11:25

You must log in to answer this question.

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