我试图为崇高文本3建立一个命令行链接。
如果我运行/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl,就会像平常一样打开崇高文本。
然后我运行sudo ln "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
重新启动终端,我得到如下信息:
$ ls /usr/bin/subl
/usr/bin/subl
$ subl
-bash: subl: command not found我还尝试在我的.profile alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"中设置
但我也得到了command not found
编辑:
/usr/bin/也在我的PATH里
EDIT2:
我试着重新启动我的电脑,但仍然不能工作。
似乎我制作的任何新别名在我的.profile中都不起作用。
我试过ln -s "/usr/bin/mail" /usr/bin/testln,它成功了。
EDIT3:,我通过在.bash_profile中添加一个别名来让它工作。我仍然想知道为什么我的ln不能工作。
发布于 2013-09-20 05:47:15
可以将别名添加到.profile文件中,如下所示:
alias subl="open -a Sublime\ Text"在你做完之后
subl .应该工作得很好
https://stackoverflow.com/questions/18909603
复制相似问题