You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experimenting with SwiftTerm in a MacOS app that connects to a remote server agent via a websocket connection. The payload that gets exchanged are byte arrays. As you would imagine from a terminal, the byte arrays often contain control sequences, like ESC[K (\x1B[K) . In my implementation I am passing the byte array like terminalView.feed(byteArray: ArraySlice(decodedMessage.payload)), but control sequences are not being handled, and only text is being displayed in the terminal all on one line, and wrapping. My question is, should SwiftTerm be handling these sequences natively, or should I be detecting these sequences and handling myself?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am experimenting with SwiftTerm in a MacOS app that connects to a remote server agent via a websocket connection. The payload that gets exchanged are byte arrays. As you would imagine from a terminal, the byte arrays often contain control sequences, like ESC[K (\x1B[K) . In my implementation I am passing the byte array like
terminalView.feed(byteArray: ArraySlice(decodedMessage.payload))
, but control sequences are not being handled, and only text is being displayed in the terminal all on one line, and wrapping. My question is, should SwiftTerm be handling these sequences natively, or should I be detecting these sequences and handling myself?Example payload (shell prompt):
Beta Was this translation helpful? Give feedback.
All reactions