OS X: support the `open` command
Are you missing a feature? Request its implementation here.
-
- Posts: 107
- Joined: Mon Jul 30, 2007 11:31 pm
- Location: College Park, MD, United States
OS X: support the `open` command
The open command
On OS X, Apple provides a super-handy open command. It’s a versatile command with many, many uses. Check out the manpage for several examples.
One of my favorite uses is this:
This opens the application appName no matter where it is.
This is super useful if you don’t know the path—or if you don’t want to have to type a really/really/really/long/path .
Taking that one step further, you can use the command:
Which open the application and passes it args.
The open command and Oxygen apps
I just tried doing this with DiffFiles:
But it didn’t work.
What About DiffFilesMac.sh?
Indeed! It’s a useful script. And I do use it. It works well.
However:
Can Oxygen apps please support accepting arguments from the open command?
On OS X, Apple provides a super-handy open command. It’s a versatile command with many, many uses. Check out the manpage for several examples.
One of my favorite uses is this:
Code: Select all
open -a appName
This is super useful if you don’t know the path—or if you don’t want to have to type a really/really/really/long/path .

Taking that one step further, you can use the command:
Code: Select all
open -a appName [ args… ]
The open command and Oxygen apps
I just tried doing this with DiffFiles:
Code: Select all
open -a DiffFiles file1.xml file2.xml

What About DiffFilesMac.sh?
Indeed! It’s a useful script. And I do use it. It works well.
However:
- it’s a very/long/path/to/my/oxygen/directory
- open is an OS X provided command that has been around forever. (In fact, it first appeared in NextStep—it’s older than OS X!) It’s powerful, flexible, and it’s not going anywhere.
- 99% of the time, I can use it to launch any application without typing a path for the application or any arguments. I don’t even have to symlink anything! It “just works”.
Can Oxygen apps please support accepting arguments from the open command?

-- Zearin
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: OS X: support the `open` command
Hello,
Thank you for the feedback.
I see that this behavior worked at one time(up to Oxygen 11.2), but it seems it was broken starting with v12.0.
I have logged this to our issue tracking tool and it will be investigated and resolved in a future version of Oxygen.
Regards,
Adrian
Thank you for the feedback.
I see that this behavior worked at one time(up to Oxygen 11.2), but it seems it was broken starting with v12.0.
I have logged this to our issue tracking tool and it will be investigated and resolved in a future version of Oxygen.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: OS X: support the `open` command
Hi,
We've tested this and it works, but DiffFiles and all the other Oxygen tools only accept the file names as arguments(not as files to be opened) and arguments are passed differently to the application by the open command:
See the open command documentation:
https://developer.apple.com/library/mac ... pen.1.html
On the other hand the main Oxygen apps work directly with the files to be opened:
There's also the problem that the file arguments for the tools have to be absolute paths. So you would have to use:
A simple workaround to avoid using the absolute paths is to use pwd instead of the path. e.g.
We will investigate and try to remove these limitations in a future version of Oxygen.
Regards,
Adrian
We've tested this and it works, but DiffFiles and all the other Oxygen tools only accept the file names as arguments(not as files to be opened) and arguments are passed differently to the application by the open command:
Code: Select all
open -a application [--args arg1 ...]
https://developer.apple.com/library/mac ... pen.1.html
On the other hand the main Oxygen apps work directly with the files to be opened:
Code: Select all
open -a Oxygen file1.xml file2.xml
Code: Select all
open -a DiffFiles --args /path/to/file1.xml /path/to/file2.xml
Code: Select all
open -a DiffFiles --args `pwd`/file1.xml `pwd`/file2.xml
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service