diff options
author | stuconnolly <stuart02@gmail.com> | 2012-05-07 11:07:44 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-05-07 11:07:44 +0000 |
commit | 38eae1b30dc9eb65138741079737cb3e5adcc354 (patch) | |
tree | c1a390cb0d696450a2b9a4dfc57fd3f96eedb11c /Source/SPTextView.m | |
parent | e638ab4bc8e1414b6333370af07f851bd218f623 (diff) | |
download | sequelpro-38eae1b30dc9eb65138741079737cb3e5adcc354.tar.gz sequelpro-38eae1b30dc9eb65138741079737cb3e5adcc354.tar.bz2 sequelpro-38eae1b30dc9eb65138741079737cb3e5adcc354.zip |
Move the BASH command code from the string additions category to remove the dependency on SP specific code and all the tests to build successfully.
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r-- | Source/SPTextView.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m index 5466bd83..ac9bf3a2 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -40,8 +40,10 @@ #ifndef SP_REFACTOR /* headers */ #import "SPAppController.h" #endif -#import <SPMySQL/SPMySQL.h> #import "SPDatabaseStructure.h" +#import "SPBundleCommandRunner.h" + +#import <SPMySQL/SPMySQL.h> #pragma mark - #pragma mark lex init @@ -1853,7 +1855,7 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse) NSRange cmdRange = [theHintString rangeOfRegex:@"(?s)(?<!\\\\)\\$\\(\\s*(.*)\\s*\\)" capture:1L]; if(cmdRange.length) { NSError *err = nil; - NSString *cmdResult = [[theHintString substringWithRange:cmdRange] runBashCommandWithEnvironment:nil atCurrentDirectoryPath:nil error:&err]; + NSString *cmdResult = [SPBundleCommandRunner runBashCommand:[theHintString substringWithRange:cmdRange] withEnvironment:nil atCurrentDirectoryPath:nil error:&err]; if(err == nil) { [theHintString replaceCharactersInRange:tagRange withString:cmdResult]; } else if([err code] != 9) { // Suppress an error message if command was killed |