From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43785-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id cbf46f2f for ; Wed, 7 Nov 2018 11:31:42 +0000 (UTC) Received: (qmail 11596 invoked by alias); 7 Nov 2018 11:31:31 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43785 Received: (qmail 17061 invoked by uid 1010); 7 Nov 2018 11:31:31 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f175.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.167.175):SA:0(-2.0/5.0):. Processed in 1.687896 secs); 07 Nov 2018 11:31:31 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=brW48kIt8gtCBS6fx61BXmjpgZJ/vYqyHwmjTnCwrZY=; b=aqbwsCh1szl7ggZNkSg01StKTJPYcrWFvMim71BCuwBQSk6zvuCsdubCnxXtWHlILA k7hy2RQP9GEl8r5cwRSIgU9i5D7BJDqMx5n9d29dZglk+hH+sJgRoeV03g9Ou/W0Eg1k vbul2A0F4eHzL0f+spIoEXui/dvEbBGW8oMUx9i7AUzwKXNEcs5mMNbeKTc4zMv/Mzv+ oI1AmTs0bRoRg2nzI4Oov4GALMm5yAvo3FKtBqcg6AyNYRjNYdLHoJIE1w1P+kf9tRUM 0gkA+oGhJ8sLU5acq5RXsdu+c5R2+8uzqVl0jHyCbGfjsFCN8G73NSCnOolWCcsXSW7j lMvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=brW48kIt8gtCBS6fx61BXmjpgZJ/vYqyHwmjTnCwrZY=; b=kBIednxCz0HUqHwRo8GLKcHlWGEC9bWjR1Yp3sxtS0DNBij6kPoF52sXoFBqxWOKFe RZ4IwL9Ti+rnHOwWyxvaNpofQbjzEWQsNhObMHrvhF7JAFH+neSrzyFbXm2QM42Qy/Fh Whu4Hbgfetybl22IWP0a9/UIZcqVGcfe3MPO/4GFVvsZVEzDr+xB0FTcFRC0pJLjNAJH lJ7wtTcH8Gc6+CKbYHYZGpy4zLAW3pG7Ke84f52It5/qFtyUdyi2cGG6oo9sk+6xJlnN dz1moZHnCQqg1cgL8S22qMRJO9VLbXHdI50hW8Q6NKh4iQS8nx0PWIFh3OkT+qjE/4Bb jlbg== X-Gm-Message-State: AGRZ1gK3gRIlPZOJmYdPUqgDWhu9Ddi6Wts/2kZUalO2Gvu3iwJ+To+W 62+rjcUUwmFDRNWII+169/YJgSHbUQ3cjHRr9G9BEtvR X-Google-Smtp-Source: AJdET5cZkwBKAFjfiS+HU3UOkPdVdt4QW3gD/IwZMwPEIPamGjkRwfEzCMOiuklGoz8/bA8kh2c/ehKLqvUs8t41tuI= X-Received: by 2002:aca:afd0:: with SMTP id y199-v6mr698381oie.322.1541590287052; Wed, 07 Nov 2018 03:31:27 -0800 (PST) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Wed, 7 Nov 2018 12:31:15 +0100 Message-ID: Subject: This is probably known and wont-fix: zpty -w always adds a new line To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, according to man, zpty -w should add a new-line only if invoked with option -n. But the experience, e.g. the written command-line (to Src/zsh zpty process) always gets executed, even without -n =E2=80=93 says = a new-line is written also without -n. Also other proof, I have a function zpty_input (a modified W02jobs.ztst function) that if obtains string "nl" as $2, then it emits $'\n' after the input ($1; to in-zpty ran Src/zsh). Now, assuming zpty doesn't write new line without -n, I was using `nl' string after each command (not after \C-a key). The effect: number of Zle-echoed-back lines (again, the zpty process is Src/zsh with Zle active) was doubled, i.e. I was receiving my sent commands (correct, $'\n'-ended) and the same number of empty lines. Conclusion: my `nl' / $'\n' new-line was followed by zpty -w new-line and this resulted in an empty line after each zpty -w. Removing my `nl' allows to read normal, not doubled number of echoed-back lines, which results in a less-hacky or tricky impression when reading the code. I guess this is a wont-fix and maybe even something known. Projects zsh-async and zsh-autosuggestions are using `zpty' and changing the current behavior would cause problems for them. That said, it's now impossible to e.g. just enter a text at zpty/zsh command-line and do nothing. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org