[CMake] bash completion for cmake
Kishore
kitts.mailinglists at gmail.com
Wed Jul 28 12:04:52 EDT 2010
On Wednesday 28 Jul 2010 7:07:20 pm Eric Noulard wrote:
> 2010/7/28 Kishore <kitts.mailinglists at gmail.com>:
> > On Tuesday 27 Jul 2010 6:05:59 pm Eric Noulard wrote:
> >> 2010/7/27 Eric Noulard <eric.noulard at gmail.com>:
> >> > Here comes a proposal for a bash completion for cmake. Should work
> >> > with almost any cmake version because it's using cmake command to
> >> > retrieve completion.
> >> >
> >> > Prerequisite: You should have "bash-completion" package installed.
> >> >
> >> > If you want to try you may either:
> >> >
> >> > 1) add the attache "cmake" file to /etc/bach_completion.d/
> >> > 2) source the file in your current (bash shell)
> >> > $ . .cmake
> >> >
> >> > then
> >> >
> >> > $ cmake <TAB><TAB> offers first level completion
> >> >
> >> > $ cmake --help-command <TAB><TAB> offers second level completion
> >>
> >> Here comes an updated file with some support for cpack and ctest too.
> >>
> >> I did submit this as a proposal to bash-completion project:
> >> https://alioth.debian.org/tracker/index.php?func=detail&aid=312632&group
> >> _id =100114&atid=413095
> >
> > Thanks a lot for this. Unfortunately it does not work here. This is what
> > i get with "cmake <TAB><TAB>"
> >
> > $ cmake _get_comp_words_by_ref: command not found
> > -_get_comp_words_by_ref: command not found
>
> Are you sure "bash-completion" package is installed ?
Yes. I am certain about that.
> You can verify with:
>
> $ dpkg-query -W bash-completion
>
> which should answer something like:
>
> bash-completion 1:1.2-2
bash-completion 1:1.1-3ubuntu2
> or some sort of error saying the package is not found.
>
> If not found, you may install the package with:
>
> sudo aptitude install bash-completion
>
> then retry cmake completion.
--
Cheers!
Kishore
More information about the CMake
mailing list