DEV Community

Discussion on: Files with the most changes on Git repository

Collapse
 
waylonwalker profile image
Waylon Walker

$(!!) Trick is genius

Collapse
 
augustohp profile image
Augusto Pascutti

It is! It is specially useful while you are figuring the part of a longer command (as above).

I use it a lot with for loops, to lint changed files for example:

$ git diff --name-only
$ for f in $(!!)
do
php -l "$f"
done
Enter fullscreen mode Exit fullscreen mode
Collapse
 
waylonwalker profile image
Waylon Walker

🤯