Closed aikow closed 1 month ago
if I need to clarify or test anything else, just let me know :) and thanks again for your time and help!
Thank you so much for this!
I just tried your
git-completion-man
branch and that fixes the issue. I can now get completions on MacOS.
This also makes me happy :) I'll try to finalize this into main
tomorrow.
This now should be fixed on latest main
.
Thanks for your time and trying to make 'mini.git' a better module!
Contributing guidelines
Module(s)
mini.git
Description
This is a 2 fold problem, and was originally discussed in the beta testing thread for the mini.git module.
The first issue is that the completion hangs, and eventually times out. This is because I have the
MANPAGER
environment variable set tonvim +Man!
, although I would assume similar behavior for other slightly more obscure pagers. This can easily be fixed by overriding theMANPAGER
environment variable in theenvs
table that is passed toH.cli_run
. I've copied your code snippet here for completeness’s sake.Once the first issue was fixed, the second issue that arose is what you explained in this comment.
The behavior this results in using the current (main branch) implementation of `mini.git is that regular completion of subcommands and git objects, like branches and tags works fine, but completion for options is broken.
I just tried your
git-completion-man
branch and that fixes the issue. I can now get completions on MacOS.Neovim version
v0.11.0-dev+g0e9c92a90
Steps to reproduce
minimal.lua
can theoretically be empty, it just needs to add mini.git as a module.MANPAGER='nvim +Man!' nvim -nu minimal.lua
:Git -
Or
MANPAGER=cat nvim -nu minimal.lua
:Git -
Expected behavior
See completions for options
Actual behavior
Current main branch just hangs until it times out. This is due to my custom
MANPAGER
environment variable. Without that, it still doesn't show completions for options, due to the way MacOS formats man pages, causing the section headers to be formatted in a way that the parsing logic for options insidemini.git
can't pick up.