-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathin.yml
86 lines (77 loc) · 3.16 KB
/
in.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# TODO - pry-disasm
pry-theme:
commands: [ pry-theme ]
desc: Alternative syntax highlighting.
use cases:
- Being more snazzy
- Making pry more like your editor, so you can scan more easily.
url: https://github.com/kyrylo/pry-theme
pry-pretty-numeric:
desc: >-
A very simple, but nice, plugin. Turns 12345689 into 12_345_689 on output
(Which is legal Ruby input).
use cases:
- Any time you have big numbers.
url: https://github.com/genki/pry-pretty-numeric
pry-syntax-hacks:
commands: []
desc: >-
Cirwin's wild bag of tricks. The caveat is that it's pretty wild and
tricky - especially since input with `@`s can get rewritten as an
instance_variable_get. Still, this is only a matter of understanding the
dialect used, and adapting accordingly.
use cases:
- Direct member access; User.new.@secret_password
- Calling private methods; User.new.!hash_password('foo')
# TODO: - %w([email protected] [email protected]).map &User.:find_by_email
- Accessing Pry outer bindings; cd (a = Object.new) then puts ../a
url: https://github.com/ConradIrwin/pry-syntax-hacks#readme
pry-highlight:
commands: [ '>>' ]
desc: Reformat strings with pretty-printing. Auto-detects JSON/XML/Ruby.
use cases:
- After a method produces ugly XML, do ">>" by itself to see it prettied.
- Pass in the string as an arg, e.g., >> '{"a":1}'
- Pass in any Ruby as an arg, >> File.read("/var/www/foo.html")
# TODO - >> -t javascript "function hi() { return 'bye' }")
url: https://github.com/ConradIrwin/pry-highlight#readme
pry-editline:
desc: >-
Pop the current line into a text editor. In tpope's words, "Whenever I'm
using IRB or Pry, my editor always feels too far away. Yes, there are
[ways to] spawn an editor and evaluate the result, but that's not what I
need. Usually I'm about 80 characters or so into a hairy one-liner when I
think, "you know, I really wish I was in Vim right about now." In Bash,
one can load the current command line into an editor with C-x C-e. And
now, you can do so in IRB and Pry."
use cases:
- Ctrl+x, Ctrl+e or Ctrl+o (if in Emacs mode or Vi Insert Mode)
- v or o (if in Vi Normal Mode)
url: https://github.com/tpope/pry-editline
pry-git:
commands: [ 'git add', 'git blame', 'git diff' ]
desc: Method-level git commands.
use cases:
- Blame/diff a specific method.
url: https://github.com/pry/pry-git
pry-developer_tools:
commands: [ define-command, edit-command, reload-command ]
desc: Mostly for Pry/Pry Plugin development, but can be useful interactively.
use cases:
- define-command 'r', 'rerun' do run 'history --replay -1' end
- reload-command show-method
- edit-command show-method
- edit-command -p show-method
url: https://github.com/pry/pry-developer_tools
#pry-autopilot:
# commands: []
# desc: Script pry to do whatever you want.
# use cases:
# - Automatically 'next' until it finds itself inside program code, (rather than gem/stdlib code)
# url: https://github.com/pry/pry-autopilot#readme
awesome_print:
commands: [ ap ]
desc: Not a Pry plugin, but a useful tool, still.
use cases:
- Gnarly objects. ap the_gnarly_obj
url: TODO