-
Notifications
You must be signed in to change notification settings - Fork 21
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
expand ide:// protocol to do more than just clone #44
Comments
idea: ide://clone?repo=[url]&path=src/main/java/test.java clone if necessary, open file path ide://clone?open=https://github.com/starfixdev/starfix/blob/master/cli/installer/windows/installer/starfix.reg and have "magic parsing" that detects this is a github backed url and do the right clooning and open. |
example patterns for gitlab, github etc. can be found at https://github.com/jbangdev/jbang/blob/478f0c8202ea189362fac80fde5a02f3e7bd1fb5/src/main/java/dev/jbang/util/Util.java |
first step: clone/reuse repo and open file path second step: handle case where branch does not match or file might not exist locally |
I tried working with VS Code.
|
code ~/code/myrepo ~/code/myrepo/src/myfile.java Works as far as I'm aware. |
Oh wow.. that worked !! |
|
Is this not just because the command does not have first argument defined ? i.e. add the following:
and it will let you pass the URI in as first free argument. |
We have the first argument defined right ? |
Yes but you can other option which will work when it is not clone or config. |
|
I was wondering if Picocli provides something like we have for switch case in Java.
|
Mark the Uri parameter as optional. Then it is not required. See picocli Docs for the syntax. |
|
I had made changes to the PR yesterday. |
Can close this issue ? |
right now we just have
ide://<url to clone>
, but would be interesting to have stuff likeide://clone?repo=<url>
andide://open?path=<url-to-file>
where open would clone if needed and open the file - if repo already cloned just open the file.Similar could add things like
ide://open?path=<url-to-file>&line=27
to open file and go to line 27.The text was updated successfully, but these errors were encountered: