[Bash-completion-devel] [bash-completion-Bugs][312632] Proposal for cmake command bash completion.

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Mon Mar 19 18:48:54 UTC 2012


Bugs item #312632, was changed at 2010-07-27 04:01 by Igor Murzov
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312632&group_id=100114

Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Proposal for cmake command bash completion. 
Distribution: --Distribution-Agnostic--
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
There is no bash completion for the cmake (http://www.cmake.org) I propose one
attached to this bug report.

----------------------------------------------------------------------

>Comment By: Igor Murzov (garik-guest)
Date: 2012-03-19 22:48

Message:
> I saw you did include up-to-date cpack options. I need to test them

That's a good thing to do!

> where do you want to put those files?

Let's put them in cmake. I have initial patches for both cmake and bash-completion for this purpose:
1. https://github.com/GArik/CMake/commit/7d63fbe952f9c4d88c44c556e03f0920fa2e6afe
2. https://github.com/GArik/bash-completion/commit/f523a45d6992347554e8e52dbb4d11df90c34bff

First patch is probably ok if there are no serious problems with completions as I'm not an expert in cmake stuff, so testing is required. Some known problems with the patch are related to hard to parse format for generators and to _parse_help not able to catch some options properly (ctest --http1.0 for example).

Second patch is kinda stub as I wrote two required configs for cmake,
but I don't have sufficient knowledge about autotools and I don't
know how to add them to Makefile.am properly. What we need to do
is to process the files the same way as bash-completion.pc.in and
then copy result to /usr/share/cmake/bash-completion/. If you can help to do this, that would be nice.


----------------------------------------------------------------------

Comment By: Eric NOULARD (erk-guest)
Date: 2012-03-19 13:37

Message:
Hi Igor,

I saw you split-up the file in 3 parts which seems logical.
I saw you did include up-to-date cpack options.

I need to test them but your completion file are already far better than mine
so I **really** don't mine letting you maintain this since you have obviously far better knowledge than me concerning bash-completion.

I can try to cope with my lack of knowledge in this area but as
time is scarced ressource...

So I return the question where do you want to put those files?
   1) bash-completion
   2) cmake

I should be able ensure review and upstreamability of the file in cmake tree,
but it may be easier for you to maintain them in bash-completion?

If the file go to bash-completion I can still synchronize them in the cmake
tree but not install them (as it is the case today) that way the user can still
pick-up up-to-date completion file and will get them automatically as soon as bash-completion is updated?


----------------------------------------------------------------------

Comment By: Eric NOULARD (erk-guest)
Date: 2012-03-19 13:18

Message:
Sorry I have left some questoin unanswered.
I may maintain cmake completion.

I am participating to CMake development so that I currently maintain
the upstream version:
http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Docs/cmake-completion;hb=HEAD

>From my side it's easier to have it in cmake tree because I do some work in there more often. That said the upstream completion file is not installed by default so that user currently have to do it themselves so having it installed with bash-completion would certainly give better user experience.

And Igor is right the potential breakage with externally maintained completion...

For now I'll merge Igor improvment into upstream version

----------------------------------------------------------------------

Comment By: Igor Murzov (garik-guest)
Date: 2012-03-18 03:25

Message:
I did new improved completions for cmake, cpack and ctest. They are available in the cmake branch: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=shortlog;h=refs/heads/cmake

Can we add them to the bash-completion? Or it's better to send them to cmake maintainers?

----------------------------------------------------------------------

Comment By: Igor Murzov (garik-guest)
Date: 2012-02-17 20:08

Message:
The biggest problem with external completions is that they need to be tested somehow. And if some changes in bash-completion break some external completions, no one will notice. I don't mind including cmake completion if Eric will maintain the completion and it is convenient for him to have completion in bash-completion.

----------------------------------------------------------------------

Comment By: Eric NOULARD (erk-guest)
Date: 2010-08-21 11:42

Message:
No I'm not that sure.
The things is I had the impression that most of the bash completions
were shipped with bash-completion itself.

I may ship cmake completion with cmake it's not a problem.
I may only want to avoid depending on bash-completion in order
to be able to install cmake, but I guess I can check for bash completion
at install time.


----------------------------------------------------------------------

Comment By: Ville Skyttä  (scop-guest)
Date: 2010-08-21 10:48

Message:
Are you sure you want this included in bash-completion?  In my opinion, it is preferable to ship upstream completions in the upstream package rather than bash-completion; that way the completions have a much better chance of being up to date with the actual upstream software than if it was in bash-completion.  Just drop the file in /etc/bash_completion.d when installing cmake.  If you want to take advantage of utilities in bash-completion without depending on it, you can test for existence of the functions you'd like to use before using them and fall back to some other local (perhaps simple/less featureful) implementation if they're not found.

----------------------------------------------------------------------

Comment By: Eric NOULARD (erk-guest)
Date: 2010-08-20 21:33

Message:
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Docs/cmake-completion;h=011f3fa93be3ac38b657b0f31a17291d32f7043b;hb=HEAD

The most up-to date cmake-completion file may be found in upstream
CMake repository.

I am maintaining the file.
I really would like to see this go upstream in bash-completion
but I haven't had any contact for this now.

Am I doing something wrong?

----------------------------------------------------------------------

Comment By: Eric NOULARD (erk-guest)
Date: 2010-07-27 16:29

Message:
There an update here.
http://lists.alioth.debian.org/pipermail/bash-completion-devel/2010-July/002923.html

I did not have an alioth account when filing the bug, I now have one.
May be someone may authorize me (erk-guest) to add attachment in order
to put the updates directly here?

What is the best way to go 
  1) for having cmake completion shipped with bash-completion
  2) for updating my proposal



----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312632&group_id=100114



More information about the Bash-completion-devel mailing list