[cmake-developers] Update bash completion scripts

Eric Noulard eric.noulard at gmail.com
Fri Jun 10 10:12:09 EDT 2016


2016-06-10 15:56 GMT+02:00 Brad King <brad.king at kitware.com>:

> On 06/10/2016 09:31 AM, Eric Noulard wrote:
> > Here comes an update of the bash completion scripts.
> > All of them now handle the same set of --help-xxx options
> > the handling of --help-manual has been added.
>
> Thanks, applied:
>
>  bash-completion: Add cmake --help-manual
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f67afbdc
>
>  bash-completion: Add ctest --help-{manual,module,policy,property,variable}
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8178a77
>
>  bash-completion: Add cpack --help-{manual,module,policy,property}
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eacb75de
>
> > +         --help-policy)
> > +            COMPREPLY=( $( compgen -W '$( ctest --help-policies
> 2>/dev/null |
> > +                grep "^  CMP" 2>/dev/null )' -- "$cur" ) )
> > +            return
> > +            ;;
>
> Does this actually work?  IIRC older CMake versions did not
> have `--help-policy-list` so the `--help-policies` hack was
> used.  However, I don't know if the output format of the
> latter will be matched by the `grep` anymore.
>


You are right this part was obsolete.
To be honest I did not test the policy completion :-(


>
> If needed, please post a follow-up patch to fix policy completion
> for cmake, ctest, and cpack.
>

 Here you go.


-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160610/29535c35/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Update-help-policy-completion-with-comtemporary-cmak.patch
Type: text/x-diff
Size: 2325 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160610/29535c35/attachment.patch>


More information about the cmake-developers mailing list