为zshrc添加Sublime Text别名 [英] Adding an alias for Sublime Text to zshrc
问题描述
关于如何为SublimeText添加别名到我的ZSH,有一个简单的问题。我去过他们的网站,他们告诉您如何在bash中进行操作,但是我不知道如何在ZSH中进行操作。它一直让我丧命,我只想从命令提示符下打开文本文件。有人在创建别名的ZSH方面有经验吗?
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?
推荐答案
zsh $>中的别名c $ c>的创建方式与
bash
相同。
Aliases in zsh
are created in the same manner as in bash
.
alias somealias='something longer'
现在somealias将扩展为更长的时间(不带引号) )。将其放入〜/ .zshrc
以使其持久。
Now somealias will expand to 'something longer' (without the quotes). Put it into ~/.zshrc
to make it persistent.
这篇关于为zshrc添加Sublime Text别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!