mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user