To set an alias for a longer command:
Go to
.zshrc
file.
Go to alias section and add alias for example
alias pyserver=’python3 -m http.server’
Now first run the command
source .zshrc
then only it’ll work.
You are good to go!