2017-01-29 117 views

回答

2

那些不是響應(終端將響應),但控制序列由應用程序(而不是終端)發送。我看到幾個實例(OSC可能會打印爲^[]和CSI作爲^[[如果轉義字符被顯示爲^[):

]0;[email protected]:~ 

看起來像設置窗口標題(從xterm中雖然有幾個項目的控制支持它),

OSC Ps ; Pt BEL 
OSC Ps ; Pt ST 
... 
      Ps = 0 -> Change Icon Name and Window Title to Pt. 

[?1034h 

LO OKS像從xterm中的曲目另一序列(一般不被其他程序支持):

CSI ? Pm h 
      DEC Private Mode Set (DECSET). 
... 
      Ps = 1 0 3 4 -> Interpret "meta" key, sets eighth bit. 
      (enables the eightBitInput resource). 

對於給定的例子中,編碼是不是一個因素。

爲了捕獲應用程序的輸出,script程序很有用。我使用小工具(unmap)將生成的typescript文件轉換爲可讀格式,但cat -v通常適用於此目的。

更多閱讀:XTerm Control Sequences