[Pulp-list] pulp-admin bash completion script added

Jason L Connor jconnor at redhat.com
Fri Oct 7 00:47:03 UTC 2011


On Thu, 2011-10-06 at 19:21 -0400, James Slagle wrote:
> I've added a bash completion script for pulp-admin.  This makes it so that you
> can tab complete pulp-admin commands, subcommands, arguments and even some
> other things.
> 
> First, make sure you have installed the bash-completion package (if you don't
> already have this installed, definitely check it out, it makes your life
> easier in lots of ways), then rerun pulp-dev.py --install, and the completion
> script will get installed.
> 
> The bash completion works just like it does for other commands you might be
> familiar with, such as 'ls', tab twice to get a printed list of possible
> completions, or tab once to complete the current word.
> 
> The point of completion is not to enforce command line correctness, however, it
> should show you the correct possible options, e.g., once a command is
> specified, you'll only see subcommands that pertain to that command, once a
> subcommand is specified, you'll only see --<parameter>'s that pertain to that
> subcommand, etc.
> 
> Once I got that working, I went a little crazy and added support for
> completing consumer id's and repo id's.  The completion script itself actually
> runs pulp-admin behind the scenes to get the possible consumer/repos.  So,
> if the comand you type is 'pulp-admin consumer bind --repoid ', and then tab
> twice, you'll get a list of all possible repo id's for whatever pulp server
> you're pointing at.
> 
> Let me know any feedback, and we can add this to get installed as part of the
> pulp-admin rpm automatically.
> 
> Start saving those keystrokes!
> 
> --
> -- James Slagle
> --

That so rocks James!

/me plays...

-- 
Jason L Connor
linear on freenode #pulp
http://pulpproject.org/
RHCE: 805010912355231
GPG Fingerprint: 2048R/CC4ED7C1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20111006/fa7eff17/attachment.sig>


More information about the Pulp-list mailing list