madsmith / bash-completion-lib

Automatically exported from code.google.com/p/bash-completion-lib
GNU General Public License v2.0
0 stars 0 forks source link

Automating calls to `comp_install' and first generation of completions #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Adding the following lines to each completion script is somewhat of a burden:

---8<-------------------------------------------------------------------

comp_install  # Make completion persistent for subsequent invocations

_cdp  # Generate completions for first invocation

---8<-------------------------------------------------------------------

Can't these calls be automated?

Original issue reported on code.google.com by fvu...@gmail.com on 2 Aug 2008 at 8:20

GoogleCodeExporter commented 8 years ago

Original comment by fvu...@gmail.com on 2 Aug 2008 at 8:21

GoogleCodeExporter commented 8 years ago
Fixed in r47 within comp_load():  If sourcing the completion returns true and a
function named underscore plus the command (_command) is available, these two 
calls
are done automatically:

     # Make completion persistent for subsequent invocations
 _comp_install $comp "$path" && \
     # Generate completions for first invocation
 _$comp $link

Original comment by fvu...@gmail.com on 19 Aug 2008 at 5:29