默认的Mac OS X的terminal是没有Alt key的,很麻烦,可以通过这样来设置
Terminal > Preferences > Settings > Keyboard
选中Use option as meta key即可