Невозможно запустить TextMate из оболочки с символической ссылкой в ​​bin (новая альфа-версия) (OSX) - PullRequest
0 голосов
/ 16 февраля 2012

У меня установлена ​​последняя версия textmate в приложениях, исполняемый файл здесь -

/Applications/TextMate.app/Contents/MacOS/TextMate 

Я могу запустить TextMate OK, как обычно, из значка в приложениях

Чтобы иметь возможность запускаться из оболочки (я использую ZSH), я добавил символическую ссылку в / usr / local / bin примерно так -

sudo ln -s /Applications/TextMate.app/Contents/MacOS/TextMate /usr/local/bin/mate

Но я пытаюсь запустить mate из оболочки, получаю следующее -

mate[22695:8403] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

Возможно, я неправильно установил textmate?

Ответы [ 2 ]

2 голосов
/ 26 июня 2013

Вам необходимо создать символическую ссылку на CLI 'mate', а не файл TextMate.

sudo ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/local/bin/mate
1 голос
/ 16 февраля 2012

Я согласен с @shellter, но ...

Я не знаю, работает ли он в zsh, но TextMate имеет свою собственную оболочку CLI (mate), которую вы можете установить из Preferences -> Terminal.Он работал хорошо в течение многих лет и очень удобен:

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'
...