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

Support completion for user-defined formats #786

Closed
brainplot opened this issue Aug 8, 2020 · 0 comments · Fixed by #802
Closed

Support completion for user-defined formats #786

brainplot opened this issue Aug 8, 2020 · 0 comments · Fixed by #802

Comments

@brainplot
Copy link

System Details

  • posh-git version/path: 1.0.0 beta4 ~\Documents\WindowsPowerShell\Modules\posh-git\1.0.0
  • PowerShell version: 5.1.19041.1
  • git version 2.28.0.windows.1
  • OS: Microsoft Windows NT 10.0.19041.0

Issue Description

Git offers the possibility to define your own formats to use with --format flag for git log. I defined a custom one:

[pretty]
        birdseye = %C(auto)%h%d% s %C(bold blue)<%aN> %C(green)(%cr)%Creset

but it doesn't show up in the list of completions when I type --format=:

image

rdnlsmith added a commit to rdnlsmith/posh-git that referenced this issue Oct 21, 2020
Enumerates any `pretty.*` keys in the user's Git config and includes
them alongside built-in options like `oneline`, `short`, `full`, etc.
for the `--pretty=` and `--format=` parameters of `git log` and
`git show`.

The key enumeration is done generically via function `gitConfigKeys`,
which in theory could be used for enumerating other config values with a
similar structure.

Fixes dahlbyk#786.
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 a pull request may close this issue.

1 participant