You can see all the commands you have already entered by using the history command. Use history_number to indicate how many commands to show, starting with the most recent. If you do not specify history_number, the value of the debugger variable $historylines (default 20) is used to determine the number of previous commands shown. See also History replacement of the line.
history_command
: history [ integer_constant ]
For example:
(idb) history 7
18: stop at 182
19: run
20: stop at 103
21: delete 1
22: cont
23: print "history_EXAMPLE START"
24: history 7