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
ESC + . inserts the last argument, quite similar like Alt + . on Linux
-
1It'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.– LriCommented Jun 3, 2013 at 7:58
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)
-
That is pretty sweet. Is there any reason why I don't want to turn that option on?– CasebashCommented Sep 10, 2010 at 10:13
-
2If 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