Signed-off-by: James Turnbull <[email protected]>
---
 bin/pi                       |   50 ++++++++++++++++++++++++++++++++++++-----
 lib/puppet/application/pi.rb |   18 +++-----------
 2 files changed, 48 insertions(+), 20 deletions(-)

diff --git a/bin/pi b/bin/pi
index 6ac759e..d7746d9 100755
--- a/bin/pi
+++ b/bin/pi
@@ -5,13 +5,51 @@
 #
 # 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
+#
+# Note that any configuration parameter that's valid in the configuration file
+# is also a valid long argument.  For example, 'ssldir' is a valid 
configuration
+# parameter, so you can specify '--ssldir <directory>' as an argument.
+#
+# See the configuration file documentation at
+# http://reductivelabs.com/projects/puppet/reference/configref.html for
+# the full list of acceptable parameters. A commented list of all
+# configuration options can also be generated by running puppet with
+# '--genconfig'.
+#
+# 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 67fffdc..2d7b8d8 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
-- 
1.6.0.6


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to