我在应用程序中安装了最新的textmate,可执行文件在这里 -
/Applications/TextMate.app/Contents/MacOS/TextMate
我可以从应用程序
中的图标正常启动TextMate OK为了能够在shell中运行(我使用ZSH),我在/ usr / local / bin中添加了一个符号链接,如此 -
sudo ln -s /Applications/TextMate.app/Contents/MacOS/TextMate /usr/local/bin/mate
但我尝试从shell运行配偶,我得到以下内容 -
mate[22695:8403] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting
也许我安装了textmate错了?
答案 0 :(得分:2)
您需要符号链接'配合'CLI,而不是TextMate文件。
sudo ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/local/bin/mate
答案 1 :(得分:1)
我同意@shellter但是......
我不知道它是否适用于zsh
但TextMate有自己的CLI包装器(mate
),您可以从Preferences - >安装它。终奌站。它运作良好多年,非常方便:
Usage: mate [-awl<number>rdnhv] [file ...]
Options:
-a, --async Do not wait for file to be closed by TextMate.
-w, --wait Wait for file to be closed by TextMate.
-l, --line <number> Place caret on line <number> after loading file.
-r, --recent Add file to Open Recent menu.
-d, --change-dir Change TextMates working directory to that of the file.
-n, --no-reactivation After edit with -w, do not re-activate the calling app.
-h, --help Show this information.
-v, --version Print version information.
If multiple files are given, a project is created consisting of these
files, -a is then default and -w will be ignored (e.g. "mate *.tex").
By default mate will not wait for the file to be closed
except when used as filter:
ls *.tex|mate|sh -w implied
mate -|cat -n -w implied (read from stdin)
An exception is made if the command is started as something which ends
with "_wait". So to have a command with --wait as default, you can
create a symbolic link like this:
ln -s mate mate_wait
另一个便宜的选择是为~/.*rc
文件zsh
在启动时执行的bash
添加别名,类似于此alias mate='open -a textmate'
:
{{1}}