From dd645d9215fb215bb549efdfa9a31a16f9232cf7 Mon Sep 17 00:00:00 2001 From: Jonathan Jackson Date: Fri, 11 Nov 2011 10:43:33 -0500 Subject: [PATCH] Add man page. --- man/pry.1 | 195 ++++++++++++++++++++++++++++++++++++++++++++++ man/pry.1.html | 204 +++++++++++++++++++++++++++++++++++++++++++++++++ man/pry.1.ronn | 141 ++++++++++++++++++++++++++++++++++ 3 files changed, 540 insertions(+) create mode 100644 man/pry.1 create mode 100644 man/pry.1.html create mode 100644 man/pry.1.ronn diff --git a/man/pry.1 b/man/pry.1 new file mode 100644 index 00000000..d8cbaa69 --- /dev/null +++ b/man/pry.1 @@ -0,0 +1,195 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "PRY" "1" "November 2011" "" "" +. +.SH "NAME" +\fBPRY\fR \- A Reference to the PRY repl\. +. +.SH "Synopsis" +\fBpry\fR [\fB\-\-version\fR] [\fB\-\-exec\fR] [\fB\-\-no\-pager\fR] [\fB\-\-no\-history\fR] [\fB\-\-no\-color\fR] [\fB\-f\fR] [\fB\-\-no\-plugins\fR] [\fB\-\-installed\-plugins\fR] [\fB\-\-simple\-prompt\fR] [\fB\-\-require\fR \fIfile\fR] [\fB\-I\fR] [\fB\-\-context\fR] [\fB\-\-help\fR] +. +.SH "DESCRIPTION" +Pry is a powerful alternative to the standard IRB shell for Ruby\. It is written from scratch to provide a number of advanced features\. +. +.SH "HOMEPAGE" +http://pry\.github\.com/ +. +.SH "OPTIONS" +. +.TP +\fB\-v \-\-version\fR +Prints the version of Pry\. +. +.TP +\fB\-e \-\-exec\fR +Executes argument in context before the session starts\. +. +.TP +\fB\-\-no\-pager\fR +Disable pager for long output\. +. +.TP +\fB\-\-no\-history\fR +Disable history loading\. +. +.TP +\fB\-\-no\-color\fR +Disable syntax highlighting for session\. +. +.TP +\fB\-f\fR +Prevent loading of ~/\.pryrc for session\. +. +.TP +\fB\-\-no\-plugins\fR +Supress loading of plugins\. +. +.TP +\fB\-\-installed\-plugins\fR +List installed plugins\. +. +.TP +\fB\-\-simple\-prompt\fR +Enable simple prompt mode (eg, >>)\. +. +.TP +\fB\-r \-\-require\fR +Require a ruby script at startup\. +. +.TP +\fB\-I\fR +Add a path to the $LOAD_PATH +. +.TP +\fB\-c \-\-context\fR +Start the session in the specified context\. Equivalent to \fBcontext\.pry\fR in a session\. +. +.SH "FILES" +~/\.pryrc Personal pry initialization +. +.SH "EXAMPLES" +. +.SS "Basic Usage" +. +.nf + +$ pry +[1] pry(main)>4 + 5 +=> 9 +[2] pry(main)> def hello_world +[2] pry(main)* puts "Hello, World!" +[2] pry(main)* end +=> nil +[3] pry(main)> hello_world +Hello, World! +=> nil +. +.fi +. +.SS "Command Line Interaction" +Prefix any command you want your shell to execute with a period and pry will return the results from your shell\. +. +.IP "" 4 +. +.nf + +[1] pry(main)> \.date +Fri Nov 11 09:52:07 EST 2011 +. +.fi +. +.IP "" 0 +. +.P +On the command line enter \fBshell\-mode\fR to incorporate the current working directory into the Pry prompt\. +. +.IP "" 4 +. +.nf + +pry(main)> shell\-mode +pry main:/Users/john/ruby/projects/pry $ \.cd \.\. +pry main:/Users/john/ruby/projects $ \.cd ~ +pry main:/Users/john $ \.pwd +/Users/john +pry main:/Users/john $ shell\-mode +pry(main)> +. +.fi +. +.IP "" 0 +. +.SS "State Navigation" +The cd command is used to move into a new object (or scope) inside a Pry session\. When inside the new scope it becomes the self for the session and all commands and methods will operate on this new self\. +. +.IP "" 4 +. +.nf + +pry(main)> self +=> main +pry(main)> cd Pry +pry(Pry):1> self +=> Pry +pry(Pry):1> cd \.\. +pry(main)> +. +.fi +. +.IP "" 0 +. +.P +The ls command is essentially a unified wrapper to a number of Ruby\'s introspection mechanisms, including (but not limited to) the following methods: methods, instance_variables, constants, local_variables, instance_methods, class_variables and all the various permutations thereof\. +. +.P +By default typing ls will return a list of just the local and instance variables available in the current context\. +. +.IP "\(bu" 4 +The \-M option selects public instance methods (if available)\. +. +.IP "\(bu" 4 +The \-m option selects public methods\. +. +.IP "\(bu" 4 +The \-c option selects constants\. +. +.IP "\(bu" 4 +The \-i option select just instance variables\. +. +.IP "\(bu" 4 +The \-l option selects just local variables\. +. +.IP "\(bu" 4 +The \-s option modifies the \-c and \-m and \-M options to go up the superclass chain (excluding Object)\. +. +.IP "\(bu" 4 +The \-\-grep REGEX prunes the list to items that match the regex\. +. +.IP "" 0 +. +.SS "Source Browsing" +Simply typing show\-method method_name will pull the source for the method and display it with syntax highlighting\. You can also look up the source for multiple methods at the same time, by typing show\-method method1 method2\. As a convenience, Pry looks up both instance methods and class methods using this syntax, with priority given to instance methods\. +. +.IP "" 4 +. +.nf + +pry(Pry):1> show\-method rep + +From: /Users/john/ruby/projects/pry/lib/pry/pry_instance\.rb @ line 191: +Number of lines: 6 + +def rep(target=TOPLEVEL_BINDING) + target = Pry\.binding_for(target) + result = re(target) + + show_result(result) if should_print? +end +. +.fi +. +.IP "" 0 +. +.SH "AUTHORS" +Pry is primarily the work of John Mair (banisterfiend) diff --git a/man/pry.1.html b/man/pry.1.html new file mode 100644 index 00000000..e5142ef7 --- /dev/null +++ b/man/pry.1.html @@ -0,0 +1,204 @@ + + + + + + PRY(1) - A Reference to the PRY repl. + + + + +
+ + + +
    +
  1. PRY(1)
  2. +
  3. +
  4. PRY(1)
  5. +
+ +

NAME

+

+ PRY - A Reference to the PRY repl. +

+ +

Synopsis

+ +

pry [--version] [--exec] [--no-pager] [--no-history] [--no-color] [-f] [--no-plugins] [--installed-plugins] [--simple-prompt] [--require file] [-I] [--context] [--help]

+ +

DESCRIPTION

+ +

Pry is a powerful alternative to the standard IRB shell for Ruby. It is written from scratch to provide a number of advanced features.

+ +

HOMEPAGE

+ +

http://pry.github.com/

+ +

OPTIONS

+ +
+
-v --version

Prints the version of Pry.

+
-e --exec

Executes argument in context before the session starts.

+
--no-pager

Disable pager for long output.

+
--no-history

Disable history loading.

+
--no-color

Disable syntax highlighting for session.

+
-f

Prevent loading of ~/.pryrc for session.

+
--no-plugins

Supress loading of plugins.

+
--installed-plugins

List installed plugins.

+
--simple-prompt

Enable simple prompt mode (eg, >>).

+
-r --require

Require a ruby script at startup.

+
-I

Add a path to the $LOAD_PATH

+
-c --context

Start the session in the specified context. Equivalent to context.pry in a session.

+
+ + +

FILES

+ +

~/.pryrc Personal pry initialization

+ +

EXAMPLES

+ +

Basic Usage

+ +
$ pry
+[1] pry(main)>4 + 5
+=> 9
+[2] pry(main)> def hello_world
+[2] pry(main)*   puts "Hello, World!"
+[2] pry(main)* end  
+=> nil
+[3] pry(main)> hello_world
+Hello, World!
+=> nil
+
+ +

Command Line Interaction

+ +

Prefix any command you want your shell to execute with a period and pry will return the results from your shell.

+ +
[1] pry(main)> .date
+Fri Nov 11 09:52:07 EST 2011
+
+ +

On the command line enter shell-mode to incorporate the current working directory into the Pry prompt.

+ +
pry(main)> shell-mode
+pry main:/Users/john/ruby/projects/pry $ .cd ..
+pry main:/Users/john/ruby/projects $ .cd ~
+pry main:/Users/john $ .pwd
+/Users/john
+pry main:/Users/john $ shell-mode
+pry(main)>
+
+ +

State Navigation

+ +

The cd command is used to move into a new object (or scope) inside a Pry session. When inside the new scope it becomes the self for the session and all commands and methods will operate on this new self.

+ +
pry(main)> self
+=> main
+pry(main)> cd Pry
+pry(Pry):1> self
+=> Pry
+pry(Pry):1> cd ..
+pry(main)>
+
+ +

The ls command is essentially a unified wrapper to a number of Ruby's introspection mechanisms, including (but not limited to) the following methods: methods, instance_variables, constants, local_variables, instance_methods, class_variables and all the various permutations thereof.

+ +

By default typing ls will return a list of just the local and instance variables available in the current context.

+ + + + +

Source Browsing

+ +

Simply typing show-method method_name will pull the source for the method and display it with syntax highlighting. You can also look up the source for multiple methods at the same time, by typing show-method method1 method2. As a convenience, Pry looks up both instance methods and class methods using this syntax, with priority given to instance methods.

+ +
pry(Pry):1> show-method rep
+
+From: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb @ line 191:
+Number of lines: 6
+
+def rep(target=TOPLEVEL_BINDING)
+  target = Pry.binding_for(target)
+  result = re(target)
+
+  show_result(result) if should_print?
+end
+
+ +

AUTHORS

+ +

Pry is primarily the work of John Mair (banisterfiend)

+ + +
    +
  1. +
  2. November 2011
  3. +
  4. PRY(1)
  5. +
+ +
+ + diff --git a/man/pry.1.ronn b/man/pry.1.ronn new file mode 100644 index 00000000..c37eb3a4 --- /dev/null +++ b/man/pry.1.ronn @@ -0,0 +1,141 @@ +PRY(1) -- A Reference to the PRY repl. +====================================== + +##Synopsis + + +`pry` [`--version`] [`--exec`] [`--no-pager`] [`--no-history`] [`--no-color`] [`-f`] [`--no-plugins`] [`--installed-plugins`] [`--simple-prompt`] [`--require` _file_] [`-I`] [`--context`] [`--help`] + +## DESCRIPTION + + +Pry is a powerful alternative to the standard IRB shell for Ruby. It is written from scratch to provide a number of advanced features. + +## HOMEPAGE + + +http://pry.github.com/ + +##OPTIONS + + +* `-v --version`: + Prints the version of Pry. + +* `-e --exec`: + Executes argument in context before the session starts. + +* `--no-pager`: + Disable pager for long output. + +* `--no-history`: + Disable history loading. + +* `--no-color`: + Disable syntax highlighting for session. + +* `-f`: + Prevent loading of ~/.pryrc for session. + +* `--no-plugins`: + Supress loading of plugins. + +* `--installed-plugins`: + List installed plugins. + +* `--simple-prompt`: + Enable simple prompt mode (eg, >>). + +* `-r --require`: + Require a ruby script at startup. + +* `-I`: + Add a path to the $LOAD_PATH + +* `-c --context`: + Start the session in the specified context. Equivalent to `context.pry` in a session. + +##FILES + + +~/.pryrc Personal pry initialization + +##EXAMPLES + +###Basic Usage + + + $ pry + [1] pry(main)>4 + 5 + => 9 + [2] pry(main)> def hello_world + [2] pry(main)* puts "Hello, World!" + [2] pry(main)* end + => nil + [3] pry(main)> hello_world + Hello, World! + => nil + +###Command Line Interaction + + +Prefix any command you want your shell to execute with a period and pry will return the results from your shell. + + [1] pry(main)> .date + Fri Nov 11 09:52:07 EST 2011 + +On the command line enter `shell-mode` to incorporate the current working directory into the Pry prompt. + + pry(main)> shell-mode + pry main:/Users/john/ruby/projects/pry $ .cd .. + pry main:/Users/john/ruby/projects $ .cd ~ + pry main:/Users/john $ .pwd + /Users/john + pry main:/Users/john $ shell-mode + pry(main)> + +###State Navigation + + +The cd command is used to move into a new object (or scope) inside a Pry session. When inside the new scope it becomes the self for the session and all commands and methods will operate on this new self. + + pry(main)> self + => main + pry(main)> cd Pry + pry(Pry):1> self + => Pry + pry(Pry):1> cd .. + pry(main)> + +The ls command is essentially a unified wrapper to a number of Ruby's introspection mechanisms, including (but not limited to) the following methods: methods, instance\_variables, constants, local\_variables, instance\_methods, class_variables and all the various permutations thereof. + +By default typing ls will return a list of just the local and instance variables available in the current context. + +* The -M option selects public instance methods (if available). +* The -m option selects public methods. +* The -c option selects constants. +* The -i option select just instance variables. +* The -l option selects just local variables. +* The -s option modifies the -c and -m and -M options to go up the superclass chain (excluding Object). +* The --grep REGEX prunes the list to items that match the regex. + +###Source Browsing + + +Simply typing show-method method_name will pull the source for the method and display it with syntax highlighting. You can also look up the source for multiple methods at the same time, by typing show-method method1 method2. As a convenience, Pry looks up both instance methods and class methods using this syntax, with priority given to instance methods. + + pry(Pry):1> show-method rep + + From: /Users/john/ruby/projects/pry/lib/pry/pry_instance.rb @ line 191: + Number of lines: 6 + + def rep(target=TOPLEVEL_BINDING) + target = Pry.binding_for(target) + result = re(target) + + show_result(result) if should_print? + end + +##AUTHORS + +Pry is primarily the work of John Mair (banisterfiend) \ No newline at end of file