Standardise linefeed/newline handling. On input from xterm we receive a carriage return \r to submit a command, but the options passed to xterm by JupyterLab require \r\n to both move to the next line and to the start of the line. Internally within cockle we emit a \n for a newline and ShellImpl.output, which calls the outputCallback passed in by the frontend, converts this to the required \r\n. Before this PR the conversion happened in TerminalOutput and in a number of other places for specific returns. It is better to keep it in just one place as is done here.
Standardise linefeed/newline handling. On input from
xterm
we receive a carriage return\r
to submit a command, but the options passed toxterm
by JupyterLab require\r\n
to both move to the next line and to the start of the line. Internally within cockle we emit a\n
for a newline andShellImpl.output
, which calls theoutputCallback
passed in by the frontend, converts this to the required\r\n
. Before this PR the conversion happened inTerminalOutput
and in a number of other places for specific returns. It is better to keep it in just one place as is done here.