Permalink
Browse files

Update.

  • Loading branch information...
Alex Fortuna
Alex Fortuna committed Mar 9, 2012
1 parent 96061fa commit c3f63d5ccbc7a29247744aea4d1cf86ad2fef3ae
Showing with 11 additions and 13 deletions.
  1. +1 −0 .gitignore
  2. +4 −4 README.md
  3. +3 −7 lib/hack_tree.rb
  4. +3 −2 lib/hacks/ls.rb
View
@@ -9,3 +9,4 @@
/*.rb
/doc/
/pkg/
+/.yardoc
View
@@ -9,10 +9,10 @@ HackTree lets you organize and share your console hacks in a simple and efficien
Console hacks (or tricks) are handy methods you use in IRB console to do repetitive tasks. HackTree gives you the following opportunities:
-* Create hacks using a simple and uniform DSL.
-* Describe your hacks, much like you describe tasks in Rakefiles.
-* List available hacks and instantly view their descriptions right in your console.
-* Share hacks with your teammates, reuse them in different projects.
+* Create hacks using a **simple and uniform DSL**.
+* **Describe** your hacks, much like you describe tasks in Rakefiles.
+* **List available** hacks with descriptions right in your console.
+* **Share** hacks with your teammates, **reuse** them in different projects.
Setup (Rails 3)
View
@@ -57,7 +57,7 @@ def self.define(&block)
# Enable HackTree globally.
#
# >> HackTree.enable
- # Greetings.
+ # Console hacks are available. Use `c`, `c.hack?`, `c.hack [args]`
#
# >> c
# hello # Say hello
@@ -67,14 +67,10 @@ def self.define(&block)
#
# Options:
#
- # :completion => T|F # Enable completion enhancement. Default is true.
+ # :completion => T|F # Enable completion enhancement. Default is `true`.
# :with_std => [...] # Load only these standard hacks.
# :without_std => [...] # Load all but these standard hacks.
- # :quiet => T|F # Be quiet. Default is false.
- #
- # Examples:
- #
- # TODO.
+ # :quiet => T|F # Be quiet. Default is `false`.
def self.enable(method_name = :c, options = {})
options = options.dup
o = {}
View
@@ -41,8 +41,9 @@
r.global_name =~ re,
r.brief_desc && r.brief_desc =~ re,
- # TODO: Include full as an option, later.
- #r.full_desc && r.full_desc =~ re, # Better without full_desc, or examples may match.
+ # Might some time include search in `full_desc` as an option.
+ # Must not be enabled by default since it returns too many results.
+ #r.full_desc && r.full_desc =~ re,
].any?
end
end

0 comments on commit c3f63d5

Please sign in to comment.