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

Direct link to submission after cf submit #10

Closed
GaurangTandon opened this issue May 19, 2019 · 8 comments
Closed

Direct link to submission after cf submit #10

GaurangTandon opened this issue May 19, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@GaurangTandon
Copy link
Contributor

It would be helpful to provide a direct link to a submission after cf submit. This can be especially helpful if I get non-AC verdict and wish to investigate further the particular test case.

I think we need to add one more line around the display function.

func (s *Submission) display(first bool, maxWidth *int) {

Something like:

ansi.Printf(" link: %v\n", "https:codeforces.com/contest/<contest-id>/submission/<submission-id>")
@xalanq
Copy link
Owner

xalanq commented May 19, 2019

Good idea.

@xalanq xalanq added the enhancement New feature or request label May 19, 2019
@xalanq
Copy link
Owner

xalanq commented May 19, 2019

I want to add a new command to do this.
E.g.
cf open submission [<contest-id>] <submission-id>
Then it will use default web browser to open the submission page.
(but the command submission is too long :(
what do you think? And any better idea?

@GaurangTandon
Copy link
Contributor Author

Well you could shorten it to just an [s], like you do for cf pull [ac]. Alternatively, you could enable tab completion so typing submission wouldn't be that, though I am not sure how to enable tab completion there.

Why not put the submission link in the cf submit output though?

@xalanq
Copy link
Owner

xalanq commented May 19, 2019

cf open [s <submission-id>] is OK.
If I put the submission link in cf submit, it cannot open that link by click or ctrl + click (hard to wrap URL into hyper link in windows terminal)

@xalanq xalanq closed this as completed in a838bcb Jul 5, 2019
@xalanq
Copy link
Owner

xalanq commented Jul 5, 2019

cf sid <submission-id> [<contest-id>]

@infalmo
Copy link

infalmo commented Jul 8, 2019

Can this be integrated along with cf submit command?

@xalanq
Copy link
Owner

xalanq commented Jul 8, 2019

Can this be integrated along with cf submit command?

Nice idea. I think it can be saved in ~/.cfsession. I'll handle it

@xalanq xalanq reopened this Jul 8, 2019
@xalanq
Copy link
Owner

xalanq commented Jul 11, 2019

Done. Now just use cf sid to open the last submission's page~

@xalanq xalanq closed this as completed in f66ca24 Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants