Fix indentation level

Adjust wrong nesting (remove extra blank from each line) in some tests.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Fix wrong command groups

Fix issue #631 (In `help` output: aliases are no longer grouped under
Aliases heading but under (other))

Forbid redefining a group of a command once it is initialized. Also, add
some unit tests, checking for that, so we won't miss this if it happens
next time.

Reported-by: John Mair <jrmair@gmail.com>
Cc: Rob Gleeson <rob@flowof.info>
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Merge pull request #634 from kyrylo/extend-command-group-regexp

Extend command group regexp (bugfix)
Be more careful exception handling in Readline [Fixes #632, #605]

Firstly wrap the entire completion_proc in a begin/rescue/end so that
even if something we're not expecting goes wrong, we don't fail.

Secondly, only throw the user out of pry if reading from readline fails
five times in a row. This avoids a transient error (like a time-out, or
a failed tab completion) from kicking you out of pry; but also avoids
the infinite looping problem that can happen if the error is not transient.
Reinstate removed partial rescues
Remove non-determinancy caused by rbx oddity
Document and split-out whereami
version 0.10.pre.1
Try to summarize the change log
Refactor tests for command groups

We should not rely on default commands, because they can be removed or
shuffled around in the future. Use our custom command in the tests.

Also, add a test that ensures that a group does not disappear after the
call without parameters.

Reported-by: John Mair <jrmair@gmail.com>
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Merge pull request #635 from kyrylo/extend-command-group-regexp

Refactor tests for command groups
Fixed grammar in README
Merge pull request #638 from jollysonali/patch-1

Fixed grammar in README
gist --doc works with classes and methods, fixes #609
Merge remote-tracking branch 'shirmung/master'
Highlight code in comments as ruby regardless

Before this change, ? Array.try_convert would highlight the code
snippets as C, but because it's actually a ruby method all the code in
the comment is ruby.
Use Pad instead of global variables in tests

First of all, rewrite `test_cd.rb`, so instead of hard-coded so called
"binding stack" and "old stack" strings with indices (`bs1`, `os2`,
etc.) we use Enumerator that lazily creates these strings for us.
Also, implement exactly the same Enumerator for the
`test_command_integration.rb`, because we use there a lot of operations
with binding stack.

Next, replace all unwanted use of global variables in other unit tests
with Pad.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Don't use Enumerators in unit tests

In previous commit (5d983f49a23e0bf92095433afff7215e11205061) I added
Enumerators to unit tests. It appears that Enumerator is not available
for Ruby 1.8.7 and friends. So, let's rewrite the related to Enumerator
code and hard-code everything again.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
passing extra prompt data via an OpenStruct
using conf.expr_number for prompt