Slashdot Mirror


A Dedicated Shell For Git Commands

Nw submitter CMULL writes "Stop typing Git over and over again. Ruby on Rails development and consulting firm thoughtbot created an interactive shell dedicated to Git commands, gitsh. One of the primary developers says there is a need for this shell because many early Unix utilities don't take sub-commands like Git."

13 of 96 comments (clear)

  1. why not just use shell aliases? by AndroSyn · · Score: 5, Informative

    alias gstatus='git status'
    alias gcommit='git commit'

    Or whatever other commands you want? I don't see the need for a purpose built shell when aliases would work just fine?

    Some people just want to overengineer things I guess...

    1. Re:why not just use shell aliases? by phantomfive · · Score: 5, Insightful

      "Those who fail to understand Unix are doomed to reimplement it, poorly."

      --
      "First they came for the slanderers and i said nothing."
    2. Re:why not just use shell aliases? by Zeromous · · Score: 2

      Some people just want an OSS contribution on their resume I suggest.

      --
      ---Up Up Down Down Left Right Left Right B A START
  2. I don't see the point by godrik · · Score: 3, Insightful

    I am using git all the time. But most of the time, I am doing less than 5 different commands. Why would you need a shell for that?

    1. Re:I don't see the point by Bryan+Ischo · · Score: 2

      There is a pompus ass here, but I'm pretty sure it's not the O.P. And I don't think it's me either ...

  3. Comprehension Failure by Anonymous Coward · · Score: 5, Informative

    The developer in the article does not "say there is a need for this shell because many early Unix utilities don't take sub-commands", as the summary says. Rather, he motivates the idea of gitsh by comparing it to utilities which act in a shell-like manner (he picks dc as an example): if it works for them, why not for git too?

    The first version (from the summary) makes no sense; the second version (from the article) seems like a reasonable argument to me.

    Rather than fucking beta, how about we try to get the fucking summaries correct?

  4. It's three letters by Arancaytar · · Score: 4, Insightful

    Effort-wise, switching into and out of a git-specific shell just to save those three letters is a huge hassle and not worth it. (The tab completion thing is not an advantage; regular git already does that in bash.)

    For any actual development work you'll keep using both git and non-git commands; opening text editors, diffing and patching outside git, running scripts and shell snippets or sed commands. How do you pass those out of the git shell? Using an exclamation mark, like in ed? That really just inverts the problem, adds the problem of remembering whether you're currently in gitsh or bash, and adds confusion between the two environment variable scopes.

  5. gitshell by defaria · · Score: 5, Funny
    $ while true; do
    > echo -n "GitShell:"
    > read command
    > git $command
    > done

    Well that was easy!

  6. Give it time by Mateo_LeFou · · Score: 3, Interesting

    They have to build a custom shell so that later it can be hosted as a service.

    --
    My turnips listen for the soft cry of your love
  7. Re:Or just use an IDE by Luthair · · Score: 2

    To me the git integrations in IDEs have never felt quite right, CVS and SVN were great but something doesn't quite fit for the git workflow so I still use cli/gitk/gui 4-years later.

  8. Mark as duplicated by RockoW · · Score: 5, Informative

    There is already a git-sh . It even have a debian package included on the main repos.

  9. because... by znrt · · Score: 2

    ... aliases are not new. you must come up with something newish to hit the headlines.

  10. What you need is a new command shell by John+Allsup · · Score: 2

    Bash is very good, but much could be done to craft a better command shell that combines the best of Bash, Perl, Ruby and Python, with the only bit of Visual Basic that I really liked: the with construct.

    In Visual Basic, one could write
    with myObject .this := that .and := other
    end with

    The dots at the start are redundant given proper block structure, unless you also have a smalltalk like messaging facility that runs aside C++ style getters and setters. Then .this = that style constructs would do low level get and set, and
    with git
        init
        add .
        commit -m "initial commit"
        end
    which is fine provided 'git end' has no meaningful value to git.

    I'm also thinking about the consequences of replacing the environment with stacks of dictionaries, and playing with simple prototypes in Python, sometimes just half writing them to help me see how the code would look.

    --
    John_Chalisque