Mac OS X has the keys listed below mapped to move through the terminal history. We need these keys to work as they were intended in various programs, so to fix this just complete these key mappings. Right click on the Terminal window, and click “Window Settings,” then go to “Keyboard.” I also check “use option key as meta key.” Click “Use Settings as Defaults” when done.
(You press the ESC key instead of typing \033) home = \033[1~ end = \033[4~ page up = \033[5~ page down = \033[6~
export LANG=C