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

Open this tool from the command line #16

Open
luiszugasti opened this issue Dec 9, 2021 · 2 comments
Open

Open this tool from the command line #16

luiszugasti opened this issue Dec 9, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@luiszugasti
Copy link

Hi there, I've been researching command line tools to replace my kdiff3 usage. I use SVN and in my org we do three way merging very often.

In SVN, we call kdiff3 with three files - %base, %mine, and %theirs. We also call it with %merged (as an out parameter).

I'd love to be able to use vscode for diffing files, as I get syntax highlighting and error checking that I severely lack with kdiff3. If there is a way to do this, that would be much appreciated. I am also open to contributing to the project if this is possible but not implemented yet.

@zawys
Copy link
Owner

zawys commented Dec 9, 2021

Hello! Thanks for your interest in this project.

I also wanted to have such feature. Approaches coming to my mind:

  1. Change VS Code's CLI such that you can pass the file paths to diff via command line arguments. This requires some change in VS Code's API. I created an (accepted) feature request: [cli] specify command that runs on window open. I suppose that this feature is not very high on the VS Code team's agenda, but probably they will accept a pull request.
  2. Pass the information which files to diff using a temporary file. Maybe it works to create a temporary file with a special file ending on which the extension could react when it is opened in VS Code. However, this smells like it would break often, considering VS Codes recent feature of restricted workspaces and seems to be awkward for the user (ok, the extension could maybe provide a binary which creates that temporary file appropriately for the user). Also I don't like to open editors just to close them afterwards – but maybe even there there's a way around it.
  3. Have the extension provide a separate binary which launches VS Code (on demand) and communicates to the extension on some way (socket, pipes, monitored directory). Sounds doable, but probably requires much testing to be reliable on all 3 major OSes.

So I would prefer solution 1, but I would also be happy when one of the other two ways would be implemented properly.

@zawys zawys changed the title [Question] Is there any way to open this tool from the command line? [Feature request] Open this tool from the command line Dec 9, 2021
@zawys zawys added enhancement New feature or request help wanted Extra attention is needed labels Dec 9, 2021
@zawys zawys changed the title [Feature request] Open this tool from the command line Open this tool from the command line Dec 9, 2021
@luiszugasti
Copy link
Author

@zawys so sorry to reply late. I am looking into this. I agree with the strategy in solution 1, I might not get to it in a while, but it is something I would really like. Will keep discussing in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants