-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ctrl-U shortcut pushes the cursor forward #74
Comments
This looks like it might be a libedit bug. There are two different line editors that the Ruby standard library can use: GNU readline and libedit. For licensing reasons, system Ruby on OS X (and other BSD-based OSes) uses libedit, but GNU readline is used by Bash and has more features and (in my experience) fewer bugs. If you install Ruby using Homebrew ( There are some pure Ruby implementations of readline, which we could distribute with gitsh, but so far we've tried has been worse than libedit and much worse than GNU readline. |
I also see the text input gets messed up if you press up/down-arrow to walk through the shell history. |
@hakanw That's definitely related to libedit issues, and goes away when Ruby uses readline. |
But won't it be a long time until all (for example) OS X installations update its system ruby and system libedit? Maybe if gitsh wants to work on homebrew and for normal setups it should consider a fix or workaround for this? |
I'm actively looking for alternatives (see #49) but in the meantime it is possible to work around the problem by installing Ruby using Homebrew, instead of using system Ruby. |
I want to point out for people - this but all effects Ctrl-A (jump to beginning of line). Also, George's fix of installing brew ruby, then reinstalling gitsh does indeed fix it. |
Since I'm looking for alternatives (#49) and we have a nice work around (Homebrew Ruby) I'm going to close this for now. |
On OS X, pressing Ctrl-U after typing a word with a space pushes the cursor several whitespaces beyond the prompt. It's as if some imaginary text exists between the cursor and the prompt. It's not possible to bring the cursor back, even by pressing the backspace key unless return is pressed.
The text was updated successfully, but these errors were encountered: