Insert the last argument of the previous terminal command

Today I learned that you can use !$ in bash to use the last argument of the previous command. The simplest example is: mkdir /some/long/path cd !$ You can do something similar in powershell by using a PSReadline binding: Set-PSReadLineKeyHandler -Chord "Alt+." -Function YankLastArg

Run a bash script from Powershell

You can execute a bash script from Powershell on Windows by typing bash if you鈥檝e enabled WSL. For example bash ./new-til.sh. Some caveats though: Make sure you use / instead of \ in the file path Make sure the bash script was saved with unix line-endings You can also make a wrapper script for scripts you regularly execute like new-til.ps1: bash ./new-til.sh $args If you don鈥檛 or can鈥檛 enable WSL, you can use sh.exe that鈥檚 optionally installed with Git for Windows. For example sh ./new-til.sh ...