Created
June 30, 2020 05:23
-
-
Save ksaj/f3bdcc102af469abc7d47dbd9e158f92 to your computer and use it in GitHub Desktop.
A bash shortcut that blew my mind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bash users already know you can !$ to run a different command with previous args. | |
-> ls text.txt ; less !$ # becomes *less text.txt* | |
Today I discovered $:0 | |
-> ls text.txt ; $:0 less # becomes *less text.txt* | |
Mind. Blown! | |
-- Karsten Johansson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment