While the top voted answer is very complete, I prefer editing the command history.
In normal mode, type:
q:
This will give you a list of recent commands, editable and searchable with normal vim commands. You'll start on a blank command line at the bottom.For the exact thing that the article asks, pasting a yanked line (or yanked anything) into a command line, yank your text and then:
q:p
(get into command history edit mode, and then (p)ut your yanked text into a new command line. Edit at will, enter to execute.To get out of command history mode, it's the opposite. In normal mode in command history, type:
:q<enter>