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

Improved tab completion: New functions to add help hints to parameters #853

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dodmi
Copy link

@dodmi dodmi commented Apr 6, 2021

This code can be used for adding help hints to parameters in the tab completion process invoked by pressing Ctrl+Space. (Compare #851)

  • At the moment, it's only working for the git command (and aliases)
  • The hints are parsed from the output of git <mode> -h
  • The parameters are the ones from Expand-GitCommand in GitTabExpansion.ps1
  • The hints will be added if parameters match. If there's no help text for a parameter, nothing will be changed (so there should be no negative effects on other completions like branch names etc.)

The main work is done in the new file GitHintTabExpansion.ps1.
Two files of your module were changed:
posh-git.psm1 to load GitHintTabExpansion.ps1 and GitTabExpansion.ps1 (function Expand-GitCommand) to invoke the new function Add-HintsToParams

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

Successfully merging this pull request may close these issues.

1 participant