git-extras icon indicating copy to clipboard operation
git-extras copied to clipboard

git repl autocompletion

Open florian opened this issue 12 years ago • 4 comments

Feature request: Right now git-repl uses bash autocompletion, no matter what the default shell is. It would be awesome if git-repl would just use the default shell's autocompletion.

For example the git autocompletion for zsh is really nice, and I way prefer it over the one from bash.

florian avatar Mar 03 '13 14:03 florian

Is there any autocompletion now? I tried the command now, but was only able to get filename completion.

cc @spacewander

nicolaiskogheim avatar Aug 11 '16 11:08 nicolaiskogheim

Most of command-line utility use GNU readline to implement interactive autocompletion. But GNU readline doesn't have binding for shell, so it is very tough to implement one with pure bash script.

spacewander avatar Aug 13 '16 01:08 spacewander

While searching the interwebz I encountered two projects which seems to do everything we could have wished for in git-repl. After seeing these I wonder if everyone would be better of if we just deprecated our own and recommended one, or both, of those.

gitsh by Thoughtbot git-sh by Ryan Tomayko

nicolaiskogheim avatar Aug 13 '16 03:08 nicolaiskogheim

It doesn't look like git-sh (your second link) supports custom Git commands, so any git-extras commands wont work with it. Additionally, git-sh's autocomplete lists all possible commands normally available from the command-line instead of just the Git commands. In my opinion, that can become very cluttered for our purposes and cause confusion (i.e: diff vs git diff), so it may be preferable to keep autocompletion limited to Git commands.

gitsh does look promising, however.

qw3rtman avatar Aug 13 '16 04:08 qw3rtman