If you are (like I) an emacs user on MacOS X you might have this problem : how to re-assign Meta key from Option (Alt) to Cmd key in Terminal (if you don’t know what the heck I am talking about – congratulations! you are free of emacs virus).
For some mysterious reason this seems to be a huge problem, I tried few things (e.g. remapping with keyremap4macbook and cmd-key-happy) but the only reliable solution which worked so far is this:
1. Install iTerm2
2. In the “Keys” tab in configuration change “Left Command” to map to the “Right Option” key,
and then under the “Profiles” tab changed “Right Option” key to act as Esc. And then you will have Cmd as Meta
I found this suggestion here