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

Feat: Support additional short-hand modifiers in branch auto-complete #173

Closed
dan-turner opened this issue Jan 12, 2015 · 1 comment · Fixed by #174 or #343
Closed

Feat: Support additional short-hand modifiers in branch auto-complete #173

dan-turner opened this issue Jan 12, 2015 · 1 comment · Fixed by #174 or #343

Comments

@dan-turner
Copy link
Contributor

When force pushing a branch to a remote one can use either:

  • git push origin master --force

Or the shorthand version

  • git push origin +master

Unfortunately posh-git is unable to perform auto-complete of a branch name when the "+" prefx is used, presumably it is assuming the "+" is the first letter of a branch name. Likewise the same issue occurs when deleting a remote branch:

  • git push origin :master

It would be amazing if posh-git could recognise + and : as simply modifiers and still perform branch auto-complete.

dan-turner added a commit to SingularityIT/posh-git that referenced this issue Jan 12, 2015
Git supports a short-hand syntax for force-pushing a branch to a remote by including the "+" modifier before the branch name. However when doing so, Posh-git was no longer able to auto-complete the branch name as it did not understand this syntax.  This PR adds that support.

Closes dahlbyk#173
@dan-turner
Copy link
Contributor Author

Turns out that the ":" modifier is supported through the following:

https://github.com/dahlbyk/posh-git/blob/master/GitTabExpansion.ps1#L223

"+" is definitely not currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant