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