bash 运行 osascript -e '告诉应用程序“TextMate”重新加载包时出错'
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8930984/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error running osascript -e 'tell app "TextMate" to reload bundles'
提问by Nicolas Garnil
I'm trying to install Cucumber bundle for TextMate2. I followed the following instructions from the official page https://github.com/cucumber/cucumber-tmbundle:
我正在尝试为 TextMate2 安装 Cucumber 包。我按照官方页面https://github.com/cucumber/cucumber-tmbundle的以下说明进行操作:
mkdir -p ~/Library/Application\ Support/TextMate/Bundles/
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/cucumber/cucumber-tmbundle.git Cucumber.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
After running line 4: osascript -e 'tell app "TextMate" to reload bundles', I receive the following error:
运行第 4 行:osascript -e 'tell app "TextMate" to reload bundles',我收到以下错误:
23:37: syntax error: A identifier can't go after this identifier. (-2740)
Any help will be appreciated.
任何帮助将不胜感激。
回答by Ken Joyner
If you double-click on the *.tmbundle file, TextMate will ask whether you want to install the Bundle. You no longer have to copy the file into the Library directory.
如果您双击 *.tmbundle 文件,TextMate 会询问您是否要安装 Bundle。您不再需要将文件复制到 Library 目录中。
回答by user2999609
I think you cannot execute that shell command when TextMate is running. Make sure you quit TextMate before trying to execute: osascript -e 'tell app "TextMate" to reload bundles'
我认为您无法在 TextMate 运行时执行该 shell 命令。确保在尝试执行之前退出 TextMate: osascript -e 'tell app "TextMate" to reload bundles'
I then have a problem installing the cake gem, but that's another question!
然后我在安装 cake gem 时遇到了问题,但这是另一个问题!
回答by f1nch3r
It's not pretty, but I found that manually nuking everything in ~/Library/Application Support/TextMate/Cache and restarting TextMate forces all the bundles to reload. Yuck.
这并不漂亮,但我发现手动取消 ~/Library/Application Support/TextMate/Cache 中的所有内容并重新启动 TextMate 会强制所有包重新加载。哎呀。
回答by jake
I have been using Textmate2 for a while now, and I dont think the reload bundles work with it anymore or is even required (I am not sure about this).
我已经使用 Textmate2 有一段时间了,我认为重新加载包不再适用于它,甚至不需要(我不确定这一点)。
It seems like I am not answering your question, but if you intend to have a quick way to get your bundle changes or installations applied, you can just use this, "Hot Quit" option.
似乎我没有回答您的问题,但是如果您打算使用一种快速的方法来应用您的包更改或安装,您可以使用这个“热退出”选项。
http://cl.ly/3D3U3k1z3T121L3u0V1s
http://cl.ly/3D3U3k1z3T121L3u0V1s
Anyway with TM2 now saving sessions, all you need to do it just restart textmate and will not lose any context. And as usual I dont think you can complain above TM taking anytime at all to load.
无论如何,TM2 现在正在保存会话,您只需要重新启动 textmate 就可以了,并且不会丢失任何上下文。和往常一样,我认为你不能抱怨 TM 需要随时加载。
On a different note, I havent been able to get the Cucumber bundle to work with TM2 in spite of several hack and attempts. Did you have any luck with that?
另一方面,尽管进行了多次黑客攻击和尝试,我还是无法让 Cucumber 捆绑包与 TM2 一起使用。你有什么运气吗?
EDIT: I have been since then able to get the bundle to work for me after some minor changes to it. You could try it in the fork of the bundle here. Also author of the bundle might have made the same fix in the original version as well.
编辑:从那时起,我就可以在对它进行一些小的更改后让捆绑包对我来说有效。您可以在此处的捆绑包的分支中尝试它。捆绑包的作者也可能在原始版本中进行了相同的修复。
github.com/anandhak/cucumber-tmbundle
github.com/anandhak/cucumber-tmbundle

