#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Tue, 01 May 2018 23:31:37 +0200
changeset 4643 b01920109e34
parent 4642 695b02c145a9
child 4644 a55695d86845
#DOCUMENTATION by cg class: TerminalSession comment/format in: #collectOutputAndCheckForPrompt:count: #readAnyAvailableData #sendCharacter: #sendLine: changed: #closeDownShell: #paste:
TerminalSession.st
--- a/TerminalSession.st	Tue May 01 10:40:13 2018 +0200
+++ b/TerminalSession.st	Tue May 01 23:31:37 2018 +0200
@@ -205,7 +205,7 @@
 
         "/ still not dead?
         shellPid notNil ifTrue:[
-            Logger info:'stil not dead after %1' with:waitTimeInSeconds.
+            Logger info:'still not dead after %1' with:waitTimeInSeconds.
             OperatingSystem isMSWINDOWSlike ifFalse:[
                 OperatingSystem killProcessGroup:pid.
             ].
@@ -420,7 +420,7 @@
         s := s asStringCollection
     ] ifFalse:[
         (s isKindOf:StringCollection) ifFalse:[
-            self warn:'selection (' , s class name , ') is not convertable to Text'.
+            self warn:'selection (' , s class name , ') is not convertable to text'.
             ^ self
         ]
     ].
@@ -692,11 +692,11 @@
     "/ Transcript showCR:'prompts: '; showCR:promptActions.
     promptActions notNil ifTrue:[
         collectedString := collectedOutput contents.
-        i := collectedString lastIndexOf:Character lf.
+        i := collectedString lastIndexOf:(Character lf).
         i ~~ 0 ifTrue:[
             lastLine := (collectedString copyFrom:i+1) withoutTrailingSeparators.
             lastLine isEmpty ifTrue:[
-                i2 := collectedString lastIndexOf:Character lf startingAt:(i-1).
+                i2 := collectedString lastIndexOf:(Character lf) startingAt:(i-1).
                 i2 ~~ 0 ifTrue:[
                     lastLine := (collectedString copyFrom:i2+1 to:i-1) withoutTrailingSeparators.
                 ].
@@ -747,6 +747,7 @@
                 n := 0
             ] ifFalse:[
                 line := outStream nextLine,Character cr.
+                "/ Transcript showCR:('line: "',line,'"').
                 n := line size.
                 pluggableProcessInputAction notNil ifTrue:[
                     pluggableProcessInputAction value:line value:n.
@@ -758,6 +759,7 @@
         ] ifFalse:[
             n := outStream nextAvailableBytes:bufferSize into:buffer startingAt:1.
             n > 0 ifTrue:[
+                "/ Transcript showCR:('buffer: "',(buffer copyTo:n),'"').
                 pluggableProcessInputAction notNil ifTrue:[
                     pluggableProcessInputAction value:buffer value:n.
                 ].