Example: I type
man ls, than I want to get
!! I can get
man ls but how do I get
You can select particular word from last typed command with
!!: and a word designator. As a word designator you need
0. You may find
$ useful too. From
0 (zero) The zeroth word. For the shell, this is the command word.
^ The first argument. That is, word 1.
$ The last argument.
So in your case try:
In interactive mode, the easiest way to do this is just a keystroke combination alt+0 and alt+.. The shortcut alt+. means "recall n-th word from the previous line" (by default the last one) and alt+0 gives it an argument 0.
This should work for interactive bash on most systems (more generally, all shells that use
readline as its input library).