如何在cygwin中执行命令来运行Sublime Text? [英] How do I make a command in cygwin to run Sublime Text?
问题描述
我正在尝试在iterm中为cygwin中的Mac计算机模仿 subl
命令.
I'm trying to mimic the subl
command in iterm for mac computers in cygwin.
基本上,我希望能够通过键入 subl来从cygwin打开当前文件夹.
Basically, I want to be able to open a current folder from cygwin by typing subl .
我没有找到任何好的说明.我知道我的.bashrc文件位于何处.我只是不知道该怎么做才能创建命令 subl
并使其生效,从而使 subl
之后的路径以Sublime打开.
I haven't found any good instructions. I know where my .bashrc file is located. I just dont know what to do to create the command subl
and make it so that the path following subl
opens with Sublime.
任何人都可以帮忙吗?
推荐答案
您想创建一个别名,并从bashrc中获取它.
You'd want to make an alias and source it from bashrc.
示例
使用以下命令创建文件〜/.bash_aliases
:
Create a file ~/.bash_aliases
with:
alias subl='/cygdrive/c/sublime.exe' #make sure this command is correct for you
现在在〜/.bashrc
中执行:
source ~/.bash_aliases
注销并重新登录, subl.
应该可以工作
Log out and log back in, and subl .
should work
这篇关于如何在cygwin中执行命令来运行Sublime Text?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!