Skip to content
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

Add tab completion for AVH git-flow commands #231

Merged
merged 1 commit into from
Jan 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions GitTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ $subcommands = @{
submodule = 'add status init update summary foreach sync'
svn = 'init fetch clone rebase dcommit branch tag log blame find-rev set-tree create-ignore show-ignore mkdirs commit-diff info proplist propget show-externals gc reset'
tfs = 'bootstrap checkin checkintool ct cleanup cleanup-workspaces clone diagnostics fetch help init pull quick-clone rcheckin shelve shelve-list unshelve verify'
flow = 'init feature release hotfix'
flow = 'init feature bugfix release hotfix support help version config finish delete publish rebase'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that help, finish, delete, publish and rebase belong here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I suppose technically 'help' isn't handled here, but even the official completion has it. Makes sense for consistency, if you think about it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

$gitflowsubcommands = @{
feature = 'list start finish publish track diff rebase checkout pull delete'
release = 'list start finish publish track delete'
hotfix = 'list start finish publish delete'
init = 'help'
feature = 'list start finish publish track diff rebase checkout pull help delete'
bugfix = 'list start finish publish track diff rebase checkout pull help delete'
release = 'list start finish track publish help delete'
hotfix = 'list start finish track publish help delete'
support = 'list start help'
config = 'list set base'
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add version and log? This is what I have on 2.11:

Available subcommands are:
   init      Initialize a new git repo with support for the branching model.
   feature   Manage your feature branches.
   bugfix    Manage your bugfix branches.
   release   Manage your release branches.
   hotfix    Manage your hotfix branches.
   support   Manage your support branches.
   version   Shows version information.
   config    Manage your git-flow configuration.
   log       Show log deviating from base branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.10.1 (AVH Edition)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has been this version since v2.10.1 of git-for-windows.

git-for-windows/git#857

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version and log don't have any subcommands, so they don't need to be listed here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that makes sense. Thx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, it didn't click that you meant adding the commands. I guess since those don't make sense there I just assumed you were looking for version and log info for git flow included with git-for-windows. Glad someone else got it. 😊


function script:gitCmdOperations($commands, $command, $filter) {
Expand Down