LD250 / jenkins-cli-python

Jenkins command line interface written in python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bash completion for commands and arguments

muffinmad opened this issue · comments

Is there something else to this issue that can be done? The only missing pieces that come to my mind is autocompletion of branch names for jenkins setbranch and autocompletion of job names for ... almost all subcommands.

I mean.. autocompletion of job names would be awesome :D . Although I don't know if the bash automcomplete script should poll jenkins every time for the list of jobs.

Maybe every jenkins jobs call could store the list of jobs to some kind of cache file, which could be used by the bash completion script, if it would exist. (package managers (e.g. dnf) do it like this)

What do you think? Is this worth doing? Can we do it some other way? I'm open to suggestions.

I mean.. autocompletion of job names would be awesome :D

Yeah, that was the primary idea.

I think it worth doing for all sub commands which requires job_name for execution.
But branch names do not come from Jenkins itself, rather from external source (git or mercurial). Should we decide to autocomplete branch names we would need to pull them from respective VCS.

So I think we only need auto completion of job_names.

Maybe every jenkins jobs call could store the list of jobs to some kind of cache file, which could be used by the bash completion script

I think it is the best way to do this. Pull autocompletion from cache and re-validate cache on every jenkins jobs