Kaleidoscope 2公共测试版于本周发布,并获得了合并功能.好极了!但是,命令行使用对于使用情况有些模糊.我想和Git Tower一起使用Kaleidoscope,我该怎么做?
$ ksdiff --help
usage: ksdiff - send files to Kaleidoscope
command options:
[--wait, -w | --no-wait] whether to wait for the document to be
closed in Kaleidoscope before exiting
FILE options:
[--snapshot | --no-snapshot] whether the file is temporary. this
option will override the heuristics
ksdiff would otherwise use to determine
this state.
commands:
--merge send a merge
implies --wait
--output OUTPUT use OUTPUT as the destination path for
this merge. creates OUTPUT if it does
not exist.
[--base BASE] use BASE as the base content for this
merge. can improve the quality of the
default selections for some merges.
FILE FILE the files to merge
Run Code Online (Sandbox Code Playgroud)
Dav*_*ood 10
如果您使用的是MAS版Kaleidoscope,则必须手动安装ksdiff工具才能使Tower能够启动Kaleidoscope.
在这里下载http://www.kaleidoscopeapp.com/ksdiff2
自Git Tower 1.4.14起更新
Git Tower(版本1.4.14及更高版本)现在附带Kaleidoscope 2集成.不应再使用下面显示的启动器脚本,因为它们无法与Kaleidoscope 2最终版本一起正常工作.
选择Integration> Git merge时,Kaleidoscope提供正确的命令行用法.Git Tower的正确启动脚本如下所示:
〜/ Library/Application Support/Tower/CompareScripts/kaleidoscope2.sh
#!/bin/sh
LOCAL="$1"
REMOTE="$2"
BASE="$3"
MERGED="$4"
APPLICATION_PATH=/Applications/Kaleidoscope.app
CMD="$APPLICATION_PATH/Contents/MacOS/ksdiff"
"$CMD" --merge --output "$MERGED" --base "$BASE" -- "$LOCAL" --snapshot "$REMOTE" --snapshot
Run Code Online (Sandbox Code Playgroud)
〜/ Library/Application Support/Tower/CompareTools.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>ApplicationIdentifier</key>
<string>com.blackpixel.kaleidoscope</string>
<key>ApplicationName</key>
<string>Kaleidoscope</string>
<key>DisplayName</key>
<string>Kaleidoscope</string>
<key>LaunchScript</key>
<string>kaleidoscope2.sh</string>
<key>Identifier</key>
<string>kaleidoscope2</string>
<key>SupportsMergeTool</key>
<true/>
</dict>
</array>
</plist>
Run Code Online (Sandbox Code Playgroud)