xxxxxxxxxx
!^ first argument
!$ last argument
!* all arguments
!:2 second argument
!:2-3 second to third arguments
!:2-$ second to last arguments
!:2* second to last arguments
!:2- second to next to last arguments
!:0 the command
!! repeat the previous line
xxxxxxxxxx
# let's say you type this
cat foo.sh
# and you want to edit things
vim press alt + .
# will auto fill the file name in this case but it could be anything
vim foo.sh
# alt + . to fill out the new commend with old arguments