readline alternate API