zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <borsenkow.msk@sni.de>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: pws-18: Multiline cut'n'paste - second go.
Date: Fri, 14 May 1999 14:15:16 +0400	[thread overview]
Message-ID: <003e01be9df2$a9a1c3f0$21c9ca95@mow.siemens.ru> (raw)

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


             reply	other threads:[~1999-05-14 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-14 10:15 Andrej Borsenkow [this message]
1999-05-14 12:13 ` Peter Stephenson
1999-05-29  7:51   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003e01be9df2$a9a1c3f0$21c9ca95@mow.siemens.ru' \
    --to=borsenkow.msk@sni.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).