todo: replace readline with libedit