mirror of
https://github.com/textmate/textmate.git
synced 2026-01-23 13:47:54 -05:00
18 lines
541 B
Plaintext
18 lines
541 B
Plaintext
#import <document/collection.h>
|
|
#import <OakFoundation/NSArray Additions.h>
|
|
#import <io/path.h>
|
|
|
|
@interface GetURLScriptCommand : NSScriptCommand
|
|
@end
|
|
|
|
@implementation GetURLScriptCommand
|
|
- (id)performDefaultImplementation
|
|
{
|
|
NSString* urlString = [self directParameter];
|
|
if([urlString hasPrefix:@"txmt:"] && ![urlString hasPrefix:@"txmt://"])
|
|
urlString = [@"txmt://" stringByAppendingString:[urlString substringFromIndex:5]];
|
|
[NSApp sendAction:@selector(handleTxMtURL:) to:nil from:[NSURL URLWithString:urlString]];
|
|
return nil;
|
|
}
|
|
@end
|