Comments (4)
@jbtule I had the same issue, thought it is catalina, but 3.1 fixed the issue. Works now again.
from cdto.
Looks like this fixed it. At least mostly
@autoreleasepool {
// Setup code that might create autoreleased objects goes here.
FinderApplication* finder = [SBApplication applicationWithBundleIdentifier:@"com.apple.Finder"];
TerminalApplication* terminal = [SBApplication applicationWithBundleIdentifier:@"com.apple.Terminal"];
FinderItem *target = [(NSArray*)[[finder selection] get] firstObject];
if (target == nil){
target = [[[[finder FinderWindows] objectAtLocation:@0] target] get];
}
if ([[target kind] isEqualToString:@"Alias"]){
target = (FinderItem*)[(FinderAliasFile*)target originalItem];
}
NSString* fileUrl = [target URL];
if(fileUrl != nil && ![fileUrl hasSuffix:@"/"]){
fileUrl = [fileUrl stringByDeletingLastPathComponent];
}
NSURL* url = [NSURL URLWithString:fileUrl];
if (url != nil){
[terminal activate];
[terminal open:@[url]];
} else {
SBElementArray *finderWindows = finder.FinderWindows;
FinderWindow *finderWindow = finderWindows.firstObject;
FinderFolder *finderFolder = finderWindow.properties[@"target"];
fileUrl = finderFolder.URL;
url = [NSURL URLWithString:fileUrl];
if(fileUrl)
{
[terminal activate];
[terminal open:@[url]];
}
}
}
}
from cdto.
I think the problem was
target = [[[[finder FinderWindows] objectAtLocation:@0] target] get];
As apple script collection is not zero based!! whoops!!
Since it looks like you've already tried the source, can you try pull request #42 see if it fixes it.
Thank you!
from cdto.
Released 3.1, let me know if this fixes your issue. Thanks.
https://github.com/jbtule/cdto/releases/tag/v3.1
from cdto.
Related Issues (20)
- 64-bit version for mojave / catalina users? HOT 7
- Does not change folder (iTerm2) HOT 3
- cd to appears to open 2 windows, is there something I can do? HOT 8
- Is there a way to create keyboard shortcut in toolbar? HOT 1
- Open iTerm2 instead of terminal HOT 5
- Not woking in High Sierra HOT 2
- Big Sur support. HOT 1
- App stopped working HOT 1
- Not woking in Big Sur HOT 1
- No longer opens apps
- Release ARM/Intel binary HOT 4
- Can't drag into finder toolbar HOT 1
- Run command
- Can't start app on BugSur 11.6.5 / Intel HOT 1
- Icon update looks strange in darkmode HOT 2
- Does not open any terminal windows and fails with messages in console
- Thank you for the tool
- I made some better icons for dark mode (attached) HOT 1
- Suppor Warp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdto.