diff options
-rwxr-xr-x | bin/pi | 40 | ||||
-rw-r--r-- | lib/puppet/application/pi.rb | 18 |
2 files changed, 38 insertions, 20 deletions
@@ -5,13 +5,41 @@ # # Print help about puppet types on the console. Run with '-h' to get detailed # help. +# = Usage # +# pi [-h|--help] [-p|--providers] [-l|--list] [-m|--meta] +# +# = Description +# +# Prints details of Puppet types, providers and metaparameters on the console. +# +# = Options +# +# help:: +# Print this help text +# +# providers:: +# Describe providers in detail +# +# list:: +# List all types +# +# meta:: +# List all metaparameters +# +# = Example +# +# pi --list +# +# = Author +# +# Luke Kanies +# +# = Copyright +# +# Copyright (c) 2005 Reductive Labs, LLC +# Licensed under the GNU Public License -# FIXME: (1) Formatting could be a lot prettier -# (2) The command line options are kinda screwy; unclear how best to -# present the various pieces of info to user - -require 'puppet/application' require 'puppet/application/pi' -Puppet::Application[:pi].run
\ No newline at end of file +Puppet::Application[:pi].run diff --git a/lib/puppet/application/pi.rb b/lib/puppet/application/pi.rb index 67fffdc1b..2d7b8d86d 100644 --- a/lib/puppet/application/pi.rb +++ b/lib/puppet/application/pi.rb @@ -175,21 +175,11 @@ class TypeDoc end -Puppet::Application.new(:pi,"#{$0} [options] [type]") do - @opt_parser.separator(" Print documentation for puppet types and their parameters") +Puppet::Application.new(:pi) do - should_not_parse_config - - option("--short", "-s", "Only list parameters without detail") do |arg| - options[:parameters] = false - end - - option("--providers","-p", "Describe providers in detail") - option("--list", "-l", "List all types") - option("--meta","-m", "Include metaparams") - option("--help","-h") do |v| - puts @opt_parser - end + option("--providers","-p") + option("--list", "-l") + option("--meta","-m") preinit do options[:parameters] = true |