I am currently using JLine library for its autocompletion feature.
I am currentlys stuck in this test case where we are needed to parse the executable. and i think i am parsing it correctly. i cant figure out whats the problem.
ya i know thats why i printed my input and getting correct inputs , here i got two element in input , where first is execcutable and seccond is argument.
this problem is happening after i used JLine.
i found out that Jline is parsing beforehand so it is giving wrong output.
how can i fix that.
Like Jline is parsing echo hi \ \ \ hi as hi hi , instead of hi hi. means it is removing the extra spaces on its own. how can i reimplement that.
i have to change the Jline behaviour of taking backslash into consideration and removing it before giving it to my Parser code.
so ,
var parser = new DefaultParser();
parser.setEscapeChars(new char[0]);
these lines made sure that Jline is not eating away my backslash
rest was fine.