getline class and function - user-editable lines with history and completition