Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Possible solution for Show in OS on Linux. #8708

@yramagicman

Description

@yramagicman

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions