zsh-workers
 help / color / mirror / code / Atom feed
* pws-18: Multiline cut'n'paste - second go.
@ 1999-05-14 10:15 Andrej Borsenkow
  1999-05-14 12:13 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Andrej Borsenkow @ 1999-05-14 10:15 UTC (permalink / raw)
  To: ZSH workers mailing list

Now Zsh correctly handles multiline input in *single* command (that is, with
PS2) - but not, when every line is a separate command.

Here is what you get when pasting more than one line (zsh in question is in
normal PS1 state):

bor@itsrm2:~%> truss -t read,write,ioctl -r 10 -w 10 -p 22812
read(10, 0x000000FFFFFEE7E4, 1) (sleeping...)
read(10, " c", 1)                               = 1
write(10, " c", 1)                              = 1
read(10, " o", 1)                               = 1
write(10, "\b c o", 3)                          = 3
read(10, " m", 1)                               = 1
write(10, " m", 1)                              = 1
read(10, " p", 1)                               = 1
write(10, " p", 1)                              = 1
read(10, " c", 1)                               = 1
write(10, " c", 1)                              = 1
read(10, " o", 1)                               = 1
write(10, " o", 1)                              = 1
read(10, " n", 1)                               = 1
write(10, " n", 1)                              = 1
read(10, " f", 1)                               = 1
write(10, " f", 1)                              = 1
read(10, "  ", 1)                               = 1
write(10, "  ", 1)                              = 1
read(10, " c", 1)                               = 1
write(10, " c", 1)                              = 1
read(10, " o", 1)                               = 1
write(10, " o", 1)                              = 1
read(10, " r", 1)                               = 1
write(10, " r", 1)                              = 1
read(10, " r", 1)                               = 1
write(10, " r", 1)                              = 1
read(10, " e", 1)                               = 1
write(10, " e", 1)                              = 1
read(10, " c", 1)                               = 1
write(10, " c", 1)                              = 1
read(10, " t", 1)                               = 1
write(10, " t", 1)                              = 1
read(10, " _", 1)                               = 1
write(10, " _", 1)                              = 1
read(10, " a", 1)                               = 1
write(10, " a", 1)                              = 1
read(10, " c", 1)                               = 1
write(10, " c", 1)                              = 1
read(10, " c", 1)                               = 1
write(10, " c", 1)                              = 1
read(10, " e", 1)                               = 1
write(10, " e", 1)                              = 1
read(10, " p", 1)                               = 1
write(10, " p", 1)                              = 1
read(10, " t", 1)                               = 1
write(10, " t", 1)                              = 1
read(10, " =", 1)                               = 1
write(10, " =", 1)                              = 1
read(10, " '", 1)                               = 1
write(10, " '", 1)                              = 1
read(10, " 2", 1)                               = 1
write(10, " 2", 1)                              = 1
read(10, " n", 1)                               = 1
write(10, " n", 1)                              = 1
read(10, " '", 1)                               = 1
write(10, " '", 1)                              = 1
read(10, "\n", 1)                               = 1
write(10, "\r\n", 2)                            = 2
ioctl(10, TCGETA, 0x000000FFFFFEEC6C)           = 0
ioctl(10, TCSETSW, 0x000000000050B1A8)          = 0
!!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!!

ioctl(0, I_FIND, "sockmod")                     = 0
ioctl(10, TIOCGSID, 0x000000FFFFFEECAC)         = 0
ioctl(10, TIOCSPGRP, 0x000000FFFFFEECF4)        = 0
ioctl(10, FIONREAD, 0x000000FFFFFEE7BC)         = 0
ioctl(10, TIOCGSID, 0x000000FFFFFEE6FC)         = 0
ioctl(10, TIOCSPGRP, 0x000000FFFFFEE744)        = 0
ioctl(10, TCGETA, 0x000000FFFFFEE6FC)           = 0
ioctl(10, TCSETSW, 0x000000FFFFFEE7C0)          = 0
write(10, 0x0000000000505EB0, 50)               = 50
  \r1B [ 0 m1B [ 2 2 ; 2 7 m1B [ 2 4 m1B [ J1B [ 2 ; 7 m b o r @ i
   t s r m 2 : ~ % >1B [ 2 2 ; 2 7 m
write(10, "1B [ K", 3)                          = 3
read(10, 0x000000FFFFFEE7E4, 1) (sleeping...)

As you see, we get TCSETSW *immediately* after NL was seen (and output).
That throughs away any pending input - so, following FIONREAD is a noop.

/andrej


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-05-29  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-14 10:15 pws-18: Multiline cut'n'paste - second go Andrej Borsenkow
1999-05-14 12:13 ` Peter Stephenson
1999-05-29  7:51   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).