Update ctag function, add up/down arrows for history completion