'Returns list of history entries.'

def _get_history_lines(self):

    history_file_name = self._get_history_file_name()
    if os.path.isfile(history_file_name):
        with io.open(history_file_name, 'r', encoding='utf-8', errors='ignore') as history_file:
            lines = history_file.readlines()
            if settings.history_limit:
                lines = lines[(- settings.history_limit):]
            for line in lines:
                prepared = self._script_from_history(line).strip()
                if prepared:
                    (yield prepared)
