[cmake-developers] bash-completion: filtering out version line more robustly

Eric Noulard eric.noulard at gmail.com
Wed Sep 25 12:18:22 EDT 2013


Hi Brad,

I think it would be simpler to use

grep -v " "

because help-*-list never contains a space (no variable or command
have embedded space)
I think you missed a couple of cases in the cmake completion.

My proposal is in stage branch:

bash-completion-improvement

Sidenote along bash completion feature:

completion of variables containing < > are not working that well

try:

$ cmake --help-variable CMAKE_<L

which does not work
whereas

$ cmake --help-variable "CMAKE_<L

works. I tried (a little) to force " " when a variable contain "<" or
">" without success
if anybody here knows an easy way to do that it would be nice to have :-]



2013/9/25 Brad King <brad.king at kitware.com>:
> Eike, Eric, Igor,
>
> Please take a look and try out this change to bash-completion:
>
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5ee80b6
>
> As explained in the commit message I'd like it to be robust to
> the "cmake version" line being removed from the beginning later.
>
> One can test it with the version dropped by editing the
> cmDocumentation::PrintDocumentation method to drop the
> conditional block that calls PrintVersion:
>
>  http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmDocumentation.cxx;hb=v2.8.11.2#l310
>
> I'd like to get a version of bash-completion out there for a
> while before actually dropping the version number line since
> people may not always use matching versions.
>
> Thanks,
> -Brad



-- 
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org



More information about the cmake-developers mailing list