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."
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...
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?
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?
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.
> echo -n "GitShell:"
> read command
> git $command
> done
Well that was easy!
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
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.
There is already a git-sh . It even have a debian package included on the main repos.
... aliases are not new. you must come up with something newish to hit the headlines.
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 .this := that .and := other
with myObject
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