Coffeescript 的 Textmate 包
我正在尝试添加咖啡脚本的文本包。 我已按照 github 上的说明进行操作 - https://github.com/jashkenas/coffee-script -tmbundle
当我尝试编译时显示 JavaScript 我收到以下错误 -
/tmp/temp_textmate.8hqQGD: line 12: coffee: command not found
我相当确定这是由于我的路径在 textmate 的首选项中不正确。
我正在尝试按照此问题的说明进行操作 - CoffeeScript TextMate Run Command 但我必须做错事,因为它不起作用。
当我喝哪杯咖啡时,我得到 /usr/local/bin/coffee
我在 textmate 的首选项中没有 TM_PATH 变量,只有一个 PATH 那么,我应该在 textmate 的 PATH 变量中放入什么?我目前有 /usr/bin:/bin:/usr/sbin:/sbin
我尝试将其更改为 /usr/local/bin/ 但当我尝试运行命令时我得到
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/bash_init.sh: line 27: dirname: command not found
任何想法?
I'm trying to add the textmate bundle for coffeescript.
I've followed the instructions on github - https://github.com/jashkenas/coffee-script-tmbundle
When I try to compile & display JavaScript I get the following error -
/tmp/temp_textmate.8hqQGD: line 12: coffee: command not found
I'm fairly certain it's due to my path being incorrect in textmate's preferences.
I'm trying to follow the instructions on this question - CoffeeScript TextMate Run Command but I must be doing something wrong as It's not working.
When I do which coffee I get /usr/local/bin/coffee
I've no TM_PATH variable in textmate's preferences only a PATH
So, what should I put in my PATH variable in textmate? I currently have /usr/bin:/bin:/usr/sbin:/sbin
I've tried changing it to /usr/local/bin/ but when I try to run a command I get
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/bash_init.sh: line 27: dirname: command not found
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将
/usr/local/bin/
添加到现有路径,而不是完全替换它:应该适合您。就我个人而言,我正在使用
并且捆绑包对我来说工作正常:
Add
/usr/local/bin/
to the existing path, instead of replacing it entirely:should work for you. Personally, I'm using
and the bundle is working correctly for me:
使用
在命令行上 可查看当前路径。将其作为
TM_PATH
复制并粘贴到 TextMate 的首选项中。额外提示:将
NODE_PATH
变量添加到您的 TextMate 首选项中,如果您需要require
语句,请将您的$NODE_PATH
粘贴到其中在 TextMate 中使用与从命令行执行的相同路径。这是我的设置:Use
on the command line to see your current path. Copy+paste that into TextMate's preferences as the
TM_PATH
.Bonus tip: Add a
NODE_PATH
variable to your TextMate preferences and paste your$NODE_PATH
in if you wantrequire
statements to use the same paths in TextMate that they do from the command line. Here's my setup:您必须将
/usr/local/bin
添加到您的路径中,而不是仅使用/usr/local/bin
覆盖您的路径,因此您的路径应如下所示:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
编辑:您可以这样添加:
PATH=$PATH: /usr/local/bin
you have to add
/usr/local/bin
to your path and not override your path with only/usr/local/bin
so your path should look like:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
edit: you can add it like that:
PATH=$PATH:/usr/local/bin