Set display name when sending diff to TextMate

We set the name as:

	'---/+++ file'

I wanted the display name to suggest a diff without calling it something directly as "file (diff)", so I thought '---/+++' would be a nice and condense way of indicating that.
This commit is contained in:
Ronald Wampler
2014-04-03 22:01:27 -04:00
parent 0ce77e8de7
commit 32ef9c8d67

View File

@@ -419,7 +419,7 @@ static NSUInteger const kOakCommitWindowCommitMessagesMax = 5;
std::transform(diffCmd.begin(), diffCmd.end(), diffCmd.begin(), &path::escape);
std::string const pwd = _environment["PWD"];
std::string const cmdString = text::format("cd %s && %s|\"$TM_MATE\" --async", path::escape(pwd).c_str(), text::join(diffCmd, " ").c_str());
std::string const cmdString = text::format("cd %s && %s|\"$TM_MATE\" --async --name \"---/+++ %s\"", path::escape(pwd).c_str(), text::join(diffCmd, " ").c_str(), path::display_name(to_s(filePath)).c_str());
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
bool success = io::exec(_environment, "/bin/sh", "-c", cmdString.c_str(), NULL) != NULL_STR;
if(!success)