This is possible. You want to investigate Ctrl-R and a little bit of history expansion.
Search backward starting at the current line and moving 'up'
through the history as necessary. This is an incremental
History expansions introduce words from the history list into the input
stream, making it easy to repeat commands, insert the arguments to a
previous command into the current input line, or fix errors in previous
Further explanations on reverse-search-history:
Hit Ctrl-R and start typing in a string. You will see the last line from your history that contains the string in any position, updated for every keypress. Hit Ctrl-R more times to see preceding lines without typing in new characters. Hit enter to accept and launch the command, left-right to edit the command, up-down to browse history without limiting to the searched string starting from the line you found, Ctrl-C to abandon the search.