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

Eric Noulard eric.noulard at gmail.com
Wed Sep 25 16:14:42 EDT 2013


2013/9/25 Matthew Woehlke <matthew.woehlke at kitware.com>:
> On 2013-09-25 12:18, Eric Noulard wrote:
>>
>> $ cmake --help-variable CMAKE_<L
>
>
> If you <tab> at the end of this line, aren't you trying to complete a local
> file name 'L'?

Yes and in fact it "restart" the completion, i.e. you get
cmake --help-variable CMAKE_<CMAKE_L

> Does it work if you escape the '<'?

I don't really know how to do that inside a partial completion.
The only option I see is to forcibly add a ' " 'prefix to the completion.

i.e. replace
compgen -W

with
compgen -P \" -W

for --help-variable.

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



More information about the cmake-developers mailing list