ZSH Alias Last Command and Alias + Persist commands
Posted on August 28, 2023 [programming] [tricks] [zsh]
Introduction
If you find yourself constantly running the same long commands on your terminal, setting up quick aliases can be a game-changer. This blog post will walk you through creating two handy ZSH functions that allow you to define and save aliases on-the-fly. With these, you can alias any command, including the last command you ran, without even leaving the terminal!
1. Create Aliases On-the-Fly
First up, let's talk about how you can instantly create aliases for any given command....