Hi,
To enable completion you also need the bash-completion package
installed and sourced in your bash session.
Sometimes the bash-completion package is missing in VM-s to save
space, but on default Ubuntu Desktop it is installed and enabled.
Bash-completion performs the completion part and uses the rules
shipped by cmake:
$ dpkg -S /etc/bash_completion.d/cmake
cmake: /etc/bash_completion.d/cmake
Cheers,
Balint
2015-11-14 21:16 GMT+04:00 Dario Lombardo <dario.lombardo.ml@xxxxxxxxx>:
> cmake completion on ubuntu leverage the cmake build dir itself. If you run
> cmake once, then try the completion, it will do the trick
>
> $ mkdir build
> $ cd build
> $ cmake ..
> [build dir is populated]
> $ cmake -D<tab>
>
> It works for me in a freshly created build dir.
>
> On Fri, Nov 13, 2015 at 11:34 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
>>
>>
>> On Nov 13, 2015, at 12:26 AM, Dario Lombardo <dario.lombardo.ml@xxxxxxxxx>
>> wrote:
>>
>> > A useful feature of cmake that works at least on ubuntu is the tab
>> > completion. So you can run
>> >
>> > cmake -DBUILD<tab>
>> >
>> > and you get a list of build targets that can be enabled/disabled.
>>
>> Not on my Ubuntu 15.10 virtual machine it doesn't - not even if I run it
>> in the Wireshark source directory. <tab> does nothing.
>>
>> $ cmake --version
>> cmake version 3.2.2
>> $ echo $SHELL
>> /bin/bash
>> $ bash --version
>> GNU bash, version 4.3.42(1)-release (x86_64-pc-linux-gnu)
>>
>>
>> ___________________________________________________________________________
>> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
>> Archives: https://www.wireshark.org/lists/wireshark-dev
>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>>
>> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
>
>
>
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives: https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe