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,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29978 invoked from network); 21 Feb 2021 17:32:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Feb 2021 17:32:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613928726; b=r3N+o4zzDHYSK64XQNRFMwvqkbfK6Vz6+z0NlEl52ltg1YdVx+ubUZsHLNNEwvP8/8YcHL60n+ AIhNs4e3RqEMyfIWsYs+sVMZSkPjnznezKvIpCFPeGR+Rv1dxioDFirh314JZ7sx6qa2ec80Qg JjWs9MveLRvE0NR/D5S0LEMJJS4xJcRK4r2ik9z0PY080ueckxBNAF7Hioi4+uO5xwIQGTnOyi ZgblwN7FPq4JhVFz+JW1v34hj+29FTxKNVaMGLZ0bTFitmOwjKQJevUk4Wjt/7cAHNj2Sga5si +2SelFTl8TU0v7Y4l8LIoufjFvv7eXMICRl2qHVbOrHrVQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f42.google.com) smtp.remote-ip=209.85.210.42; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613928726; bh=NzmWbaaSj8Lnl7Vn1rdHUfryyPcv8hedDDLIdN4bGlw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=qJ7tTQvYn6dlkhYh1U2YntHXf72Wm/tiubtBGDC1Hizsb8VEexjLjmE2piZn4VXW6nvjduPPUi CrewPdK1I5yP0YHopK2w23M95jkfzJAqwBEKjUinFLed58A8zIc48w8h2uP6OemyhGZhZonZ81 gw23Su9uMf70njQV+kR2glhc+Y/kEg1wBuim4B+IeoOppovQ12oHJ2dMdLNMlBMk/tFF5SVSJg t77mT9Lw2BJDJUDdQEkb/9ndogEq8yp/PMr4nHIpVaq6N41ozin68OM96/o6eqiJGYZ4U4I6sz IIZrMYoL8ZSyqpfCZxWB8Ecgg88+zDov5H2dqnb19ccJ0A==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=IJQSLyI0tQWlDBNgCZHdLahhz64ngPWIt6G/mSDrJcs=; b=cP+R1Y33wl59rqFDjWnNOla7kB VNc6+VHSyEVrL1nAfNiE9nAuwp/287TJvwwYpWugZldJgeUZPo7cdUjBcC5f2LfzkEhuntvunQ0aL svawZhyLxz7qczXTDc2AdKsFDUqAacjW1js7OqrWqjn8XS00/XNkJqjM9N8jl3e4VF8bHHAgE379L etSolxbIew3uvSQ4PsvDNJb8FqxPT09qzuLNnp9aXHJw+Rgb8eGkCoFHDVSAZRV7+YgfHClWg6I2V eZwGMtrQ6aYkavGhrST/USQwDhFnK29nc6qDiA+M1kGcwtK08cY1c7pwJpbBhKBHYINChbuAhmVy6 ofBVFmFw==; Received: from authenticated user by zero.zsh.org with local id 1lDsaP-000LmK-NT; Sun, 21 Feb 2021 17:32:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f42.google.com) smtp.remote-ip=209.85.210.42; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f42.google.com ([209.85.210.42]:42139) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lDsZr-000LPC-D0; Sun, 21 Feb 2021 17:31:28 +0000 Received: by mail-ot1-f42.google.com with SMTP id e45so663624ote.9 for ; Sun, 21 Feb 2021 09:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IJQSLyI0tQWlDBNgCZHdLahhz64ngPWIt6G/mSDrJcs=; b=158KEfHtdouJCfnVGSgbEid2FQ8IH+eotit9fPOR9w0QgNgHt1TKK6OJRw4/oAuh1B XuS3uJ7AfeQZKzd1CP8H8FfTUjdHsLhV+GW3C/oRqjyrXEXcsrpe38uL8yvMZnOidofy +RZx58YfAd22XRm5A0MhmzPD7a/oQhQADEonxTueuj30WLt61LYC8KubqxSg5iK6gfnz dmczyrEfU2VcyN7T+F0EFCp/JMpyMdUDbjrD0zvjIh+7VIanda6gLeQhkEUHPqXpVTve HXamTlXv/752TBJFjZimobpX1GTEr9FLr2lCDkk8+wVBBBh7GkKN+p4btWrjt9ZAXMOX FKPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IJQSLyI0tQWlDBNgCZHdLahhz64ngPWIt6G/mSDrJcs=; b=gTRCL4fHk88fTrkwWMRKW+E5X2QT+fXvAMotH8ZNGtjQt5nqEcT11vBtQKvpYsULWe MvIFNvmbm2LC5sgzsZcJGaonWfHbhJ5Bo+LIR1MmKCb2H2RBR2HTFWtzPi/NNuchX8Wc gww5LCLEcltAO9mv7FTHAK13FS1l3Ii7TJURnrmXrnwwFgucUCjAlNvxa1f0pb7mIuVD 0mdfq5b2awfg1zJoIPuk0JGKY6zMezHsleA7QYv7/SjTi4Jl4apY07IQJIgiydM/LKqf ODY8jxeqIsxj9RPLZSaxo/w77RkrdXa30wklaxaQgAXQjj8sfj3yVyVWtg6gHuKE1ZQk c/iA== X-Gm-Message-State: AOAM530q5mGoEst2ucvyqv6CXDsz8D+BZHzQ2/SuuZ/4zCijGd0OkEoe Yo3S2qZG+Q6wC4NGjJjyHA4rTGa6Ha6pqRcDunWInA== X-Google-Smtp-Source: ABdhPJyRa+vxibOEDyHiUnQTNAkncDXJXRtymJIaN3tdheC5jeUtZZ7ZisL9ZU2oFnHoCdUZWoSLdbbDS4480/nBGY0= X-Received: by 2002:a9d:6358:: with SMTP id y24mr14019770otk.229.1613928686078; Sun, 21 Feb 2021 09:31:26 -0800 (PST) MIME-Version: 1.0 References: <6a5328e7-e58d-5b47-c0df-463bf4c144ea@eastlink.ca> In-Reply-To: <6a5328e7-e58d-5b47-c0df-463bf4c144ea@eastlink.ca> From: Bart Schaefer Date: Sun, 21 Feb 2021 09:31:15 -0800 Message-ID: Subject: Re: read -sq To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26549 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 Sun, Feb 21, 2021 at 8:42 AM Ray Andrews wrote: > > If I use 'read -sq' and don't press 'y' (to do whatever), if the non 'y' > key is some normal alphabetic key, it is not echoed to the terminal as > '-s' indicates is correct, but if I use another key -- an arrow or DEL > or END or one of those, it is echoed. Can that be prevented? 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.