cf-tool icon indicating copy to clipboard operation
cf-tool copied to clipboard

cd into contest directory automatically after parsing

Open sainad2222 opened this issue 4 years ago • 7 comments

It would be nice to cd into the contest directory after parsing. For now, I am using a bash alias to do this but It would be nice if it's integrated into the tool itself

sainad2222 avatar Jan 08 '21 11:01 sainad2222

but what if a user wanted to solve another problem first before A?

Siddhant-K-code avatar Jan 31 '21 23:01 Siddhant-K-code

but what if a user wanted to solve another problem first before A?

I said contest directory not problem directory. For example cf parse 1400 Automatically cd's to cf/contest. I don't see a point why it's not implemented yet

sainad2222 avatar Feb 01 '21 06:02 sainad2222

ok, I will try to implement this

Siddhant-K-code avatar Feb 01 '21 06:02 Siddhant-K-code

@xalanq can i work on this issue?

Siddhant-K-code avatar Feb 01 '21 07:02 Siddhant-K-code

will this work? : adding following line in cf-tool/client/parse.go :

os.Chdir(./problemID)

Siddhant-K-code avatar Feb 01 '21 07:02 Siddhant-K-code

@Siddhant-K-code I already tried to do that but it turns out it is not possible to change the directory from Go file. See if you can make it work

sainad2222 avatar Feb 01 '21 08:02 sainad2222

In cpbooster I added this feature by opening a new terminal and closing the previous terminal (optionally). A similar approach can be used here. Because as of now, it is not possible to modify the current path of a terminal from some other program :(

searleser97 avatar Mar 13 '21 05:03 searleser97