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

Incorrect tab expansion for git push --option <remote> #234

Closed
DoCode opened this issue Nov 23, 2015 · 3 comments · Fixed by #379
Closed

Incorrect tab expansion for git push --option <remote> #234

DoCode opened this issue Nov 23, 2015 · 3 comments · Fixed by #379

Comments

@DoCode
Copy link

DoCode commented Nov 23, 2015

Sample

Alias

Define the alias ps as push --follow-tags

Execution

I would delete the remote branch named issue-1234

Expected

git push [TAB]=>origin [TAB]=>develop...

Current

git ps [TAB]=>develop[TAB]=>develop

Is this the current behavior? Should we strip off the arguments on tab completion?

@rkeithhill
Copy link
Collaborator

Duplicate with #257

@dahlbyk
Copy link
Owner

dahlbyk commented Jan 2, 2017

This definitely isn't a duplicate of #257, and I'm pretty sure it's not actually a bug with alias expansion (in general) either. I'm pretty sure the git push <remote> pattern is just too restrictive - it's recognizing the first token, --follow-tags, as the remote name, and thus proceeding on to match branch names.

This would be a good up-for-grabs fix.

@dahlbyk dahlbyk reopened this Jan 2, 2017
@rkeithhill
Copy link
Collaborator

Oops. Sorry about that. Maybe the issue title should be changed?

@dahlbyk dahlbyk changed the title Tabcompletion does not work when using git aliases with parameters Incorrect tab expansion for git push --option <remote> Jan 2, 2017
rkeithhill added a commit that referenced this issue Jan 28, 2017
Fix #234  BTW if we decide this is an OK fix (need another set of eyes on my $gitParams regex), I'd like to review the fact that all these switch regex case statements fallthrough to the next (observed while debugging tab expansion).  I don't believe that is necessary.  I'm thinking that most (all) of these should have a break statement.

Started a minimum set of Pester tests for tab completion.  Would be good to flesh these out over time.
rkeithhill added a commit that referenced this issue Jan 31, 2017
Fix #234  BTW if we decide this is an OK fix (need another set of eyes on my $gitParams regex), I'd like to review the fact that all these switch regex case statements fallthrough to the next (observed while debugging tab expansion).  I don't believe that is necessary.  I'm thinking that most (all) of these should have a break statement.

Started a minimum set of Pester tests for tab completion.  Would be good to flesh these out over time.

Add debug configuration for VSCode that is dedicated to debugging Pester tests.
rkeithhill added a commit that referenced this issue Jan 31, 2017
Fix #234  BTW if we decide this is an OK fix (need another set of eyes on my $gitParams regex), I'd like to review the fact that all these switch regex case statements fallthrough to the next (observed while debugging tab expansion).  I don't believe that is necessary.  I'm thinking that most (all) of these should have a break statement.

Started a minimum set of Pester tests for tab completion.  Would be good to flesh these out over time.

Add debug configuration for VSCode that is dedicated to debugging Pester tests.
rkeithhill added a commit that referenced this issue Feb 2, 2017
Fix #234  BTW if we decide this is an OK fix (need another set of eyes on my $gitParams regex), I'd like to review the fact that all these switch regex case statements fallthrough to the next (observed while debugging tab expansion).  I don't believe that is necessary.  I'm thinking that most (all) of these should have a break statement.

Started a minimum set of Pester tests for tab completion.  Would be good to flesh these out over time.

Add debug configuration for VSCode that is dedicated to debugging Pester tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants