I have an interesting problem: when I type something in the terminal as follows:
~ me$ hello<cursor>
and backtrack:
~ me$ he<cursor>llo
and then try to return to the end to continue typing, perhaps after fixing an error, I get stuck before the last character:
~ me$ hell<cursor stuck here>o
Anyone know how to fix this? I've tried looking around and changing the terminal to xterm instead of xterm-256-color, etc. but no luck. Any help is greatly appreciated!
Edit: I am using the arrow keys to move back and forth.
Best Answer
I know this is an old question, but I've been beating my head over this for a few days now and I've finally got it. It turns out the solution is simple: update bash to 4.3. The default bash on Macs (even Yosemite) is 3.2.
Install Homebrew with
then do
then change your default shell path (in Terminal Preferences) to
and that's it. Check your bash version with
and as an added bonus, you can get mode indicators!
and it will show a
+
for Insert mode and:
for Command mode.