Just have a quick question on how to add an alias for SublimeText to my ZSH. I've been to their site where they tell you how to do it within bash, but I don't understand how to do it within ZSH. It has been killing me, I just want to open text files from my command prompt. Anyone out there have experience with ZSH where they have created aliases?
To set up a simple alias, edit the ~/. zshrc file using your text editor and add an alias at the bottom. It is good to keep all your aliases in a single section of the file to avoid confusion and ease of edit. alias ginit="git init ."
The . zshrc file exists in the user home directory where ZSH aliases are configured. These aliases are loaded automatically when the shell starts, but you can force them to reload through sourcing the . zshrc file.
Aliases in zsh
are created in the same manner as in bash
.
alias somealias='something longer'
Now somealias will expand to 'something longer' (without the quotes). Put it into ~/.zshrc
to make it persistent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With