Giter Club home page Giter Club logo

Comments (7)

georgebrock avatar georgebrock commented on September 3, 2024

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 (brew install ruby) you'll get a version of Ruby 2 that uses readline instead of libedit. Re-installing gitsh (brew uninstall gitsh && brew install gitsh) should link against that Ruby version.

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.

from gitsh.

hakanw avatar hakanw commented on September 3, 2024

I also see the text input gets messed up if you press up/down-arrow to walk through the shell history.

from gitsh.

georgebrock avatar georgebrock commented on September 3, 2024

@hakanw That's definitely related to libedit issues, and goes away when Ruby uses readline.

from gitsh.

hakanw avatar hakanw commented on September 3, 2024

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?

from gitsh.

georgebrock avatar georgebrock commented on September 3, 2024

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.

from gitsh.

ericmerrill avatar ericmerrill commented on September 3, 2024

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.

from gitsh.

georgebrock avatar georgebrock commented on September 3, 2024

Since I'm looking for alternatives (#49) and we have a nice work around (Homebrew Ruby) I'm going to close this for now.

from gitsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.