Skip to content

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

@dodmi dodmi force-pushed the gitTabHintsForParams branch from 553b428 to 12a9e70 Compare April 9, 2021 22:01
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