add code sample
Make tab completion circular

In general, liner tries to follow the keyboard shortcuts and conventions
of `bash`s defaults. In this case, however, I prefer inline completion
to non-completion (and listing of possible alternatives).

* bash does nothing on the first tab, and prints a list of completions
  on the 2nd tab.
* tcsh prints a list of completions on the first tab.
* cmd.exe does circular completion in-line
* zsh does circular completion in-line, and prints alternatives below
  the line
* liner did completion once, then beeped.

liner shouldn't make up new conventions. Since I would like liner to
stay on one line, printing a list of alternatives is out. Therefore,
liner will behave like cmd.exe in this instance.

Fixes #10 and #11
Support another encoding of home/end on Linux

Tested on konsole on kUbuntu 14.04

Reported-by: Radu Ioan Fericean <radu@fericean.ro>
context sensitive history

show only those history lines that start with the input so far
Unexport getHistoryByPrefix
Allow tab completion anywhere in the line
Add new completion function WordCompleter

Unlike the existing Completer, WordCompleter can read and modify the
entire line, not just the part of the line leading up to the cursor
position.
Fix crash if <tab> is pressed after SetCompleter(nil)
Support OpenBSD, FreeBSD, and NetBSD

Tested on OpenBSD, but the others should behave similarly.
Support terminals without the CHA opcode

Some terminals, for example OpenBSD without X, do not support the Cursor
Character Absolute (CHA) opcode. Detect support and use CR/CUF instead
on those terminals.
Rename x_orig to xOrig

As suggested by golint. Underscores aren't very go-ish.
Replace zero-length slice with nil

This avoids an unnecessary call to make. As suggested by the new golint.
Add TerminalSupported

This function returns true if line editing is available, and false if
the fallback (no line editing) will be used.
Add function TerminalMode and interface ModeApplier

These functions are provided as a convenience for the management of the
terminal input mode state. Most users of liner will never need to call
them directly.
Fix TERM=dumb

Only check ANSI/ECMA-48 capabilities if the terminal is not blacklisted.
Support alternate Home/End encoding

This encoding is used by rxvt-unicode
Support alternate encoding of Ctrl-Left and -Right

This encoding is used by rxvt-unicode
Merge branch 'master' of git://github.com/peterh/liner into upstream