Configure different terminal shell on Windows
Oxygen general issues.
-
- Posts: 110
- Joined: Fri May 14, 2010 12:14 am
Configure different terminal shell on Windows
We've standardized on using Git-Bash for all interactive shell sessions for our technical writers, who are all on either Win7 or Win10.
Is it possible to configure a different terminal in Oxygen wherever a command line request is being made, such as:
Is it possible to configure a different terminal in Oxygen wherever a command line request is being made, such as:
- Project View: Show In: Terminal
- CSS ExecuteCommandLineOperation
- and any others
-
- Posts: 418
- Joined: Mon May 09, 2016 9:37 am
Re: Configure different terminal shell on Windows
Post by sorin_carbunaru »
Hello John,
1. You could create a plug-in that customizes the context menu of the Project view ( see ro.sync.exml.project.ProjectController.addPopUpMenuCustomizer(ProjectPopupMenuCustomizer) ) by removing our "Terminal" action and adding yours. This action can run a command that opens Git Bash or even call Git operations. For example:
Open Git Bash:
If you are interested in running commands and also show the results in an output side-view in oXygen, you might want to take a look at "ro.sync.exml.workspace.api.WorkspaceUtilities.startProcess(String, File, String, boolean)". See the example below:
Call "git status":
2. Regarding "ExecuteCommandLineOperation", you can do similar things like this:
Open Git Bash - create an action that runs a command like the following:
Call "git status":
- set "workingDirectory" to "Path/To/Git/Repo"
- set "cmdLine" to "cmd.exe /c "git status""
Unfortunately I just noticed a small issue with it: a side view is created even if you don't choose to show a console. I added an issue for this.
3. To be honest, I don't really know what it takes to create a Terminal side-view in oXygen. I just imagine that the easiest way to do it would be to use an existing terminal (such as Command Prompt) in the background for running the commands, while providing the input from and showing the output in oXygen's GUI.
Such a terminal can be implemented as a plugin. Do you need this terminal to run Git commands that are not covered by our Git plugin? Or for something else? As far as we remember, you usually configure External Tools for the git commands that are not covered by the plugin. Do you want to replace that part?
All the best wishes,
Sorin Carbunaru
oXygen XML
1. You could create a plug-in that customizes the context menu of the Project view ( see ro.sync.exml.project.ProjectController.addPopUpMenuCustomizer(ProjectPopupMenuCustomizer) ) by removing our "Terminal" action and adding yours. This action can run a command that opens Git Bash or even call Git operations. For example:
Open Git Bash:
Code: Select all
Process process = Runtime.getRuntime().exec("cmd.exe /c \"C:\\Program Files\\Git\\git-bash.exe\"");
Call "git status":
Code: Select all
PluginWorkspaceProvider.getPluginWorkspace().startProcess(
"Git status",
new File("C:/Path/To/Git/Repo"),
"cmd.exe /c \"git status\"",
true);
Open Git Bash - create an action that runs a command like the following:
Code: Select all
cmd /c "C:\Program Files\Git\git-bash.exe"
- set "workingDirectory" to "Path/To/Git/Repo"
- set "cmdLine" to "cmd.exe /c "git status""
Unfortunately I just noticed a small issue with it: a side view is created even if you don't choose to show a console. I added an issue for this.
3. To be honest, I don't really know what it takes to create a Terminal side-view in oXygen. I just imagine that the easiest way to do it would be to use an existing terminal (such as Command Prompt) in the background for running the commands, while providing the input from and showing the output in oXygen's GUI.
Such a terminal can be implemented as a plugin. Do you need this terminal to run Git commands that are not covered by our Git plugin? Or for something else? As far as we remember, you usually configure External Tools for the git commands that are not covered by the plugin. Do you want to replace that part?
All the best wishes,
Sorin Carbunaru
oXygen XML
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