Byron/open-rs

Open with specific app

Closed this issue · 8 comments

Like https://github.com/sindresorhus/opn, when opening a file with finder, the file can be selected, which is not in opening the folder directly.

Byron commented

@zaaack I am not sure what you this means. If this is a feature request, please feel free to sketch it out in greater detail, or create a PR. Thank you.

I think he might be referring to an api like this opn('http://sindresorhus.com', {app: 'firefox'});.
the open command on macOS supports the same behaviour with -a

@hoodie Yes, open-like command in each platform have a extra parameter to open the file with specific program, a useful case is open a file with finder or explorer will focus on the file item, like some editor/IDE's open in finder/explorer feature.

Byron commented

Thanks, that looks like a good opportunity for a PR :).

Is anyone working on this? If not I can try to make a PR. I could use the functionality to open with another program, e.g. I'd like to pass in the EDITOR environment variable to open text files with the default text editor.

Byron commented

Is this PR satisfied by open::with?

Byron commented

Thanks for pointing this out. Since this issue is very old and I also believe that open::with() is probably the solution here I am closing the issue proactively.

Please feel free to keep commenting or to open a new issue in case something is missing.