When I ssh into a Linux server from bash Terminal, I can use CTRL+A to return to the start of line properly, and CTRL+E to go to end of line and everything works fine.
When I use bash locally on my Mac, when I use CTRL+A it logically goes back to the start of the line, but doesn't display the cursor in the correct place. It displays the cursor 7 or so characters off and doesn't update the line text correct.
find . -name "hello.cpp"
find . -name "hello.cpp" ^~~ cursor shows here ????
Insert "this is a test" (just to show)
find . this is a test -name "hello.cpp" ^~~ cursor is still here ??? ^~~~~~~~~~~~~^ text inserted here ??? ^~~~~~^ unchanged for some reason
this is a test find . -name "hello.cpp"
I use the same
PS1=\n \e[1;95m \u@\h \e[0;32m\w \e[1;30m $(__git_ps1 " (%s)" ) \n \e[1;95m \@ \n $ \e[0;30m
as I do on Linux.
- bash version: 3.2.57(1)
- terminal version: 2.6.1 (361.1)
- OS X El Capitan, 10.11.5