Update pry again
This commit is contained in:
parent
2be8dda9f0
commit
d433fac32a
19
pry.md
19
pry.md
|
@ -61,18 +61,14 @@ layout: default
|
|||
> hist # History
|
||||
> wtf? # Trace of recent exception
|
||||
|
||||
## Rails
|
||||
|
||||
### Rails console
|
||||
|
||||
Also consider [pry-rails](https://rubygems.org/gems/pry-rails).
|
||||
|
||||
$ pry -r ./config/environment
|
||||
|
||||
### Bonus: hirb
|
||||
|
||||
> table User.all
|
||||
> view User.all
|
||||
> view User.all, fields: %w[id name email]
|
||||
|
||||
### Rails
|
||||
|
||||
> show-models
|
||||
|
@ -94,7 +90,7 @@ Also consider [pry-rails](https://rubygems.org/gems/pry-rails).
|
|||
|
||||
> ls -G xx # Grey by regex
|
||||
|
||||
### Shell integration
|
||||
## Shell integration
|
||||
|
||||
shell-mode adds dir to the prompt.
|
||||
|
||||
|
@ -105,7 +101,14 @@ Commands with `.` are shell commands.
|
|||
|
||||
pry(main)> .cat hello.txt
|
||||
|
||||
### Reference
|
||||
## hirb
|
||||
Add the [hirb](https://rubygems.org/gems/hirb) gem.
|
||||
|
||||
> table User.all
|
||||
> view User.all
|
||||
> view User.all, fields: %w[id name email]
|
||||
|
||||
## Reference
|
||||
|
||||
* [Pry](https://github.com/pry/pry)
|
||||
* [Hirb](https://github.com/cldwalker/hirb)
|
||||
|
|
Loading…
Reference in New Issue