def get_readline_tail(self, n=<NUM_LIT:10>):
end = self.shell.readline.get_current_history_length() + <NUM_LIT:1><EOL>start = max(end-n, <NUM_LIT:1>)<EOL>ghi = self.shell.readline.get_history_item<EOL>return [ghi(x) for x in range(start, end)]<EOL>
Get the last n items in readline history.