From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 516 invoked from network); 21 Feb 2021 17:55:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Feb 2021 17:55:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613930105; b=WCZc2TjHl+uElfOFnWDC/bi6BZ3FGiza43V1KE4zsYZbwQcOLQqNnsx8eIMYGgNC/f+Bo5eWfO 03Yy91IW0p+NO5/q+4yOqnabcKFVfVLbUScWmrMmv7QHApfa0oXVNPjVNzasYbWLEioOtT03Aw owfgIgUGTtki2EAwEhhDUG1xxfBQUQKObh/vpR9SA8MtKl+B7RRb+wt7LnfPPE1L5pRH2aU/MA B6evE/JCvsXNCpDhWXLgdt7UXUzkYatWVftngq0vE3IIJWDpAb40/mI4VDXSeT3zTgriidrEhH 0eR6rkCJoP+s8jejrYol3ErkiAvJADU6KA4HVDRmz9L8BA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613930105; bh=5wjdFle/guHoIRRpswOIjV3J2GeKsUqXs9Qu1Vmk9O8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=ylFrsTMDki4iHj3c9nuoG9HjQ1LbpIbfxM/MFw4vBEW/ZddsX2Z4u0hR7hJlrQVfeQH2+cbJ7v T5CLeVFqpyHocHIMFvj8TKgLucrXcKOdBaYwA3Kt02Njv7EwmQhrlcFnjtsnEoXdS96uflbHGb PzkRi5qaRLLK+kLafKm9HhfbAjyzTdf4uhV/XhIzErXFJfNyWZiV3tTjih9msROdzfIv6I6Ufo tpmqM2AkQF6FUAYh7gBEaT5WuV1ivWEIVLZUQPWwdsQKwJSS6WWOYi/A++oDeDazLHHuWIsVV8 5BkYRH2xv3FVhMDP78ObfAKjFYqLswu7pUgfBrircUMO7w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:MIME-version:Date:Message-id:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hySDu/DjA7DldsrRlLmuARreKTiHo8GYllHl8d96Bkg=; b=CmKTYNKyV/I8AKT1231mte0B+G gN1dOGK4bYAas0zZPM3vx2XYm4L5pALPG/KsYyDX/mi4jzhky2HOQFxG0zjvxUees9/UKNTMLk5O6 o4YksnW9LYvPcxb81e5L6XxP4KepOIZ9Tkn1mTrxnLFlp1oMNNLCs96jnoM6oSjooi5e5aC/tr2Dz DS2I6c8sLSiXylCjDq44VDkJd8fq0fpuj7JnRvQBHMQEMvIpt/Of2KCAb6wq08SB3RR1/4apnOFzJ XK+V8PCzMvr1aG5L3Z37TkX2D87SDJIh47qGpUEyY3NCj5VKwRDp88z8eCZqkHl9/S/Ut5ad5Uae/ RQ9Fc/Rg==; Received: from authenticated user by zero.zsh.org with local id 1lDswh-000MsP-TI; Sun, 21 Feb 2021 17:55:03 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:54361) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1lDsw8-000MTY-6V; Sun, 21 Feb 2021 17:54:28 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta01.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QOW004P22A4RRB0@mta01.eastlink.ca> for zsh-users@zsh.org; Sun, 21 Feb 2021 13:54:26 -0400 (AST) Received: from [192.168.0.3] ([24.207.90.194]) by Eastlink with ESMTP id Dsw5l99T4zvv8Dsw5lFuBY; Sun, 21 Feb 2021 13:54:26 -0400 X-Authority-Analysis: v=2.4 cv=QdKjAuXv c=1 sm=1 tr=0 ts=60329e52 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=tkEkoZUpciqn0otTXH8A:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkedugddutdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepkedvueeuffefhfdvueeiteffvddtvdejgeeujeekieduheeiteeiheegtedvhfefnecukfhppedvgedrvddtjedrledtrdduleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdeltddrudelgedphhgvlhhopegludelvddrudeikedrtddrfegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: read -sq To: zsh-users@zsh.org References: <6a5328e7-e58d-5b47-c0df-463bf4c144ea@eastlink.ca> From: Ray Andrews Message-id: Date: Sun, 21 Feb 2021 09:54:25 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26550 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On 2021-02-21 9:31 a.m., Bart Schaefer wrote: > Not really. As the doc for -q says, "Read only one character from the > terminal", but the arrow keys actually send more than one character. > In the case of down-arrow those are ESC, bracket, and B, so read > consumes and discards the ESC and then whatever comes after it gets > the bracket and the B. Yeah, one keystroke is not the same as one character.  I wonder if you could tell it to take whatever comes within an instant and treat that like one character?  The ESC the braket and the B must come faster than anyone could type, so clearly one keystroke, no?  Probably not worth the trouble I'll just remind myself to hit the space for 'no'.