Reuse Last Argument
How
- Type your new command, then type
!$where you want the last argument - Press Tab to expand it, or just press Enter and it will expand automatically
- For example:
cd /some/long/paththenls !$becomesls /some/long/path
Try this
Run cd ~/Documents, then type ls !$ and press Enter. Notice how it automatically uses the Documents path from your previous command.
Why it works
Chain work without retyping paths.