Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-29 Thread Florian Gamböck
On 2018-04-29 15:08, SZEDER Gábor wrote: On Sun, Apr 29, 2018 at 1:15 PM, Florian Gamböck wrote: I sense a problem here. If I have a directory with a file xyzfoobar in it, and I type `git xyz`, with no defined subcommand that starts with these letters, then minimal bashcomp

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-29 Thread SZEDER Gábor
On Sun, Apr 29, 2018 at 1:15 PM, Florian Gamböck wrote: > On 2018-04-25 16:40, SZEDER Gábor wrote: >> >> In my previous emails I overlooked the _completion_loader() helper >> function. >> >> It seems that this function does almost exactly what we want. It was >> introduced along

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-29 Thread Florian Gamböck
On 2018-04-25 16:40, SZEDER Gábor wrote: In my previous emails I overlooked the _completion_loader() helper function. It seems that this function does almost exactly what we want. It was introduced along with dynamic completion loading back in 20c05b43, so it's available for us even in

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-25 Thread SZEDER Gábor
On Mon, Apr 23, 2018 at 5:12 PM, SZEDER Gábor wrote: > On Thu, Apr 19, 2018 at 9:07 PM, Florian Gamböck wrote: >> On 2018-04-18 21:51, SZEDER Gábor wrote: >>> I believe the main bash-completion repository can be found at: >>> >>>

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-23 Thread Florian Gamböck
On 2018-04-23 17:12, SZEDER Gábor wrote: On Thu, Apr 19, 2018 at 9:07 PM, Florian Gamböck wrote: On 2018-04-18 21:51, SZEDER Gábor wrote: Would it be possible to use _xfunc() instead to plug that hole? It seems the be tricky, because that function not only sources but also

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-23 Thread SZEDER Gábor
On Thu, Apr 19, 2018 at 9:07 PM, Florian Gamböck wrote: > On 2018-04-18 21:51, SZEDER Gábor wrote: >> >> On Tue, Apr 10, 2018 at 10:28 PM, Florian Gamböck wrote: >>> >>> Adding external subcommands to Git is as easy as to put an executable >>> file git-foo into

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-19 Thread Florian Gamböck
On 2018-04-18 21:51, SZEDER Gábor wrote: On Tue, Apr 10, 2018 at 10:28 PM, Florian Gamböck wrote: Adding external subcommands to Git is as easy as to put an executable file git-foo into PATH. Packaging such subcommands for a Linux distribution can be achieved by unpacking the

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-18 Thread SZEDER Gábor
On Tue, Apr 10, 2018 at 10:28 PM, Florian Gamböck wrote: > Adding external subcommands to Git is as easy as to put an executable > file git-foo into PATH. Packaging such subcommands for a Linux > distribution can be achieved by unpacking the executable into /usr/bin > of the user's

[PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-10 Thread Florian Gamböck
Adding external subcommands to Git is as easy as to put an executable file git-foo into PATH. Packaging such subcommands for a Linux distribution can be achieved by unpacking the executable into /usr/bin of the user's system. Adding system-wide completion scripts for new subcommands, however, can