Posts

Showing posts from September 1, 2018

Does `patch` work with asymmetric context?

Image
Clash Royale CLAN TAG #URR8PPP up vote 2 down vote favorite I have file a : This file does have an error in it that needs to be fixed. and a similar file b : This file does have no error in it that needs to be fixed. I can create a unified diff with diff -u a b : --- a 2018-01-03 14:20:22 +0100 +++ b 2018-01-03 14:20:37 +0100 @@ -2,7 +2,7 @@ file does have -an error +no error in it that needs And I can also reduce the context to one line on either side with diff -u1 a b : --- a 2018-01-03 14:20:22 +0100 +++ b 2018-01-03 14:20:37 +0100 @@ -4,3 +4,3 @@ have -an error +no error in it Both of these patches can be applied cleanly with patch . I did not however find a way to make diff produce a patch with asymmetric context. I am assuming it cannot do that. So I tried removing some context manually, to make a patch with two lines of context before the change and one after: --- a 2018-01-03 14:20:22 +0100 +++ b 2018-01-03 14:20:37 +0100 @@ -3,4 +3,4 @@ does have -an er...

open eclipse from a terminal and pass a workspace to open

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite I want to open eclipse through terminal and i am able to do it, but when when eclipse starts it asks for the workspace directory attached the screenshot,and then there i have to specify it, i dont want this. As i pass the eclipse command in the terminal, i want to pass the workspace directory along with the eclipse command followed by OK as prompt ask for it. Thanks in advance. command-line terminal console arguments eclipse share | improve this question edited Jan 5 at 14:12 Alex 372 1 4 14 asked Jan 3 at 14:09 Taleev Aalam 11 4 Did you look at man eclipse ? – guntbert Jan 3 at 14:37 @guntbert no man eclipse does not work. – Taleev Aalam Jan 3 at 14:55 add a comment  |  up vote 1 down vote favorite I want to open eclipse through terminal and i am abl...