The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #14196

Add bash completion script for mco

Added by Raphaël Pinson over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:04/26/2012
Priority:NormalDue date:
Assignee:R.I. Pienaar% Done:

0%

Category:Packaging
Target version:2.1.x
Keywords: Affected mCollective version:
Branch:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

It would be good to have a bash completion script for mco.

History

#1 Updated by Raphaël Pinson over 2 years ago

A pull request has been open with a bash completion script at https://github.com/puppetlabs/marionette-collective/pull/39

#2 Updated by R.I. Pienaar over 2 years ago

  • Category set to Packaging
  • Status changed from Unreviewed to Accepted
  • Assignee set to R.I. Pienaar
  • Target version set to 2.1.x

awesome :)

#3 Updated by Raphaël Pinson over 2 years ago

The script provided in the PR is a bit uglycomplex due to having to parse the ddl files with bash.

It would make it much easier if mco could provide a simple API for this, such as:

mco --list-agents
mco service --list-actions
mco service status --list-inputs

returning (newline|space)-separated lists of items.

#4 Updated by R.I. Pienaar about 2 years ago

I merged the completion script, we’ll add your request for helpers to the ‘mco plugin’ application which seems to be a good place for it

#5 Updated by R.I. Pienaar about 2 years ago

  • Status changed from Accepted to Needs More Information

Best would be to deliver this as a application plugin, how would http://p.devco.net/57/ work for you? you can just drop that into your $libdir/application and have a play with it

#6 Updated by Raphaël Pinson about 2 years ago

That looks good to me indeed.

#7 Updated by R.I. Pienaar about 2 years ago

great, i added —list-applications there so you can complete on “mco” too, will look at getting this or something close to it into 2.1.x

#8 Updated by Raphaël Pinson about 2 years ago

Ok. When it’s merged, I can adapt the bash completion script to make use of it.

#9 Updated by R.I. Pienaar about 2 years ago

have merged that application into master http://git.io/exWzOw will leave this open till we get new bash completion

#10 Updated by R.I. Pienaar about 2 years ago

  • Status changed from Needs More Information to Closed

Added -v to the completion application which will output lists like:

% mco completion --list-agents -v
collective:Manage multiple mcollectived instances on a single node
eximng:SimpleRPC based Exim management agent
filemgr:File Manager

with similar handling for listing applications, inputs etc, this is compatible with zsh’s enhanced completion system

Added a basic zsh completion in ext/zsh and merged changes from Raphael that adjusts the bash completion to use the new plugin too

http://git.io/ENmKRw

Also available in: Atom PDF