Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Possible solution for Show in OS on Linux. #7789

Open
core-ai-bot opened this issue Aug 30, 2021 · 0 comments
Open

[CLOSED] Possible solution for Show in OS on Linux. #7789

core-ai-bot opened this issue Aug 30, 2021 · 0 comments

Comments

@core-ai-bot
Copy link
Member

Issue by yramagicman
Sunday Aug 10, 2014 at 02:13 GMT
Originally opened as adobe/brackets#8708


I'm coming into this with no context, so forgive me if I'm mentioning something that's been tried. I did search the issues on github and I didn't see anything similar, although it's quite possible I just missed it.

Could you use node.js exec() and leverage xdg-open to accomplish a similar result. The code might look like this:

var file;
if (fileType(selectedFile === "directory") {
    file = selectedFile;
} else {
    file = selectedFile.getParentDirectory(); //theoretical function
}
var exec = require('child_process').exec,
exec('xdg-open' + file, function(error, stdin, stdout){
   console.log('do stuff with stdin, stdout, and error');
});

This (exec('xdg-open ' + file, ...);) works on my Arch linux machine when run from the node console. I just don't know if it would work in the context of Brackets, or how to integrate it with Brackets.

This would at least get people in the right directory. I don't know about Nautilus, but in Thunar, once I'm in the right directory, I can just start typing the name of the desired file, and if it's there and visible, Thunar will find it and highlight it. It's not "Show in Finder" by any stretch, but it's better than nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant