RFR 8166051: [jline] Cannot parse .inputrc with \r
Robert Field
robert.field at oracle.com
Fri Sep 16 19:08:45 UTC 2016
On 09/16/16 11:31, Jonathan Gibbons wrote:
> Perhaps your .inputrc reader should support an escape mechanism for
> handling problematic characters.
.inputrc is a standard not under our control:
https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File.html
Though! That gives a hint on how we should handle this: figure out what
bash does.
-Robert
>
> -- Jon
>
> On 09/16/2016 09:26 AM, Robert Field wrote:
>> BufferedReader provides platform independent behavior. Which is
>> appropriate here because configuration files get copied between
>> platforms with different line-end standards.
>> The proposed replacement exchanges this for a platform dependent
>> strategy.
>> While it would address this one obscure failure, my concern is that
>> it will create new, possibly more common, problems. specifically
>> where a file where \r\n is used -- injecting \r into the results.
>> Not sure what the right choice is.
>> A compromise might be to accept \n or \r\n on all platforms, and \r
>> alone only on platforms that accept that as a line end.
>> I am concerned with forking jline, esp. if it not a clear fix.
>> Can we address this at a higher level? More tolerant error handling?
>>
>> -Robert
>>
>>
>> On 09/16/16 02:23, Jan Lahoda wrote:
>>> Please review a change to how .inputrc is read. Currently, it uses
>>> BufferedReader.readLine(), which interprets '\r' as a line
>>> separator, and so the '\r' character cannot be used in the macros.
>>> The proposed change is to use System.getProperty("line.separator")
>>> and "\n" as line separators.
>>>
>>> Bug:
>>> https://bugs.openjdk.java.net/browse/JDK-8166051
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~jlahoda/8166051/webrev.00/
>>>
>>> Thanks!
>>>
>>> Jan
>>
>
More information about the kulla-dev
mailing list