Re-enable hack for tab-completion with nothing under the cursor

A very nice behavior is having <tab><tab> bring up options for the next
expected commandline token when nothing is underneath the cursor. There was
a workaround to get this working with the simpleparse parser, and we need
a different workaround for it to work with pyparsing.

This keeps the same technique of adding a bogus input and seeing what the
parser would categorize it as, and then setting current_token based on
that.

We also ensure current_token is defined. Without this, the call to
_dispatch_completion fails with a NameError but somebody catches the
error so things just silently don't work, without the debug msg in
_dispatch_completion for unknown current_token ever printing.

Signed-off-by: Andy Grover <agrover@redhat.com>
update version to 1.1.11

Signed-off-by: Andy Grover <agrover@redhat.com>
Let exceptions through to callers of run_interactive

Change logic in run_interactive() to not recursively call itself, and to
let exceptions through to callers.

Raising ExecutionError instead of printing a message but not raising an
exception is now allowed. This lets us reorganize a few functions for
less nested logic.

Change log.error()s to exceptions.

Signed-off-by: Andy Grover <agrover@redhat.com>
Make error-level log messages go to stderr

Extend con.display() with an error boolean optional parameter. If true,
output goes to stderr. Is this in log._log() to send messages >= 'error'
to stderr.

This is based on work by Tregaron Bayly and Jason Earl at Bluehost, thanks.

Signed-off-by: Andy Grover <agrover@redhat.com>
Remove unneeded sys import

An earlier version of the commit used it, but its use was removed in the
final commit. Whups.

Signed-off-by: Andy Grover <agrover@redhat.com>
Another dumb thing to fix.

Arrg. Can't reference self in a default parameter.

Signed-off-by: Andy Grover <agrover@redhat.com>
update version to 1.1.fb12

Signed-off-by: Andy Grover <agrover@redhat.com>