"Shell integration" is a fairly high-usability feature. I know that some xterm.js-based applications support shell integration, most obviously vscode. However, the vscode logic is rather difficult to understand - there is a mess of handlers and events - I haven't been able to figure out how it all hangs together, and I'm not sure it's the right approach for other applications.
It is important that shell integration properties (prompt, input, output) be preserved by serialization. This suggests to me using Markers or Decorations isn't the right approach. (Decorations look like they're very inefficient if there are many of them.) Better would be to attach shell integration properties to the BufferLine (or the LogicalLine if PR #5797 is adopted).
On a character basis, we need at least 2 bits to mark if a cell is in a prompt or in user input. But there way be other information we want to store, such as the exit code, so it makes to define a CommandInfo class. The CommandInfo object could be attached to the ExtendedAttrs - ot it could be attached to the BufferLine (or LogicalLine) object.
It would be nice to deal with the shell integration logic purely in an addon, but just as with URL links, it seems best to have the basic logic be supported by the core.
Comments/suggestions? Apologies if I have overlooked a previous discussion.
"Shell integration" is a fairly high-usability feature. I know that some xterm.js-based applications support shell integration, most obviously vscode. However, the vscode logic is rather difficult to understand - there is a mess of handlers and events - I haven't been able to figure out how it all hangs together, and I'm not sure it's the right approach for other applications.
It is important that shell integration properties (prompt, input, output) be preserved by serialization. This suggests to me using Markers or Decorations isn't the right approach. (Decorations look like they're very inefficient if there are many of them.) Better would be to attach shell integration properties to the
BufferLine(or theLogicalLineif PR #5797 is adopted).On a character basis, we need at least 2 bits to mark if a cell is in a prompt or in user input. But there way be other information we want to store, such as the exit code, so it makes to define a
CommandInfoclass. TheCommandInfoobject could be attached to theExtendedAttrs- ot it could be attached to theBufferLine(orLogicalLine) object.It would be nice to deal with the shell integration logic purely in an addon, but just as with URL links, it seems best to have the basic logic be supported by the core.
Comments/suggestions? Apologies if I have overlooked a previous discussion.