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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28026 invoked from network); 22 Aug 2023 17:02:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Aug 2023 17:02:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1692723731; b=QrgAUYCJTNFsirV6CKZ69LUVqFiIjLLFPuK5OJP5EccUY9VZTfPksfH0dR35PkMCix3LotzQDs Jf+LcTeBogYMNL2UvoHvrkYZAl+PsIjkWNYVFkMQGhLbhej0pyiAqTHIW/AtgINlvifLJgDjWH qC5d5vsHuP7BXkv14NsP/PlGij8wZjIWxmSiO9wXYTz23L0YrKlK/uCbWLZboQf6cSjjKz7R31 +ZII3meKlukAKTPGio66JjKQtDCp7ivX+/mCsMFJkkWtPCSYj3TmgdB1bDLjipFXR4uo54SHbU Px+Pd3wYN2naXp+lye+yVyP3MSSd1rtJa/tEsLhIexy8Jg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (hekla.abc.se) smtp.remote-ip=158.174.61.227; dkim=pass header.d=abc.se header.s=default header.a=rsa-sha256; dmarc=none header.from=abc.se; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1692723731; bh=mtPOYP4V0v9iAFP3zQH2CTV7gIXZ3mU7cVZWmlUe+W8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature; b=m8Vkg2IRxrJl9j6dAX6uVFW9ymnHgdqNRDRBfFFRA9BHi5DUmfmmScR2so0M/L6v9z3xwCKYvc Sj6Cm1Nk6sgTiofllSkZ5r4IKYJtDRlJlyyE46Mo4LlfcwzVaA9wRG32XIfb5WocT5vJUte9Ir 69faLc3UQXfAAbEwHc3yLwwp2ELsC9wsOK+JY388c4K2ZdMj61eGMtik9K9ncQDIGFNt2P9Dfz 8vCGNwz7quAr8IuFTnnv7LoZ/cDtrYGQsL6amGv1yWGRJRPxWjYDoFEbj7bpcBQOdK5LQBigNi a6k0OpK4JhldL1Oh86rpraBx460tv0iXiQn9Z4uitW59Bg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=6G/zV+esejoLCIelA8RLtQvi0V9EW9yqTu3IiFLn9fM=; b=YyaVr44spFd1o9ci7uc8rSBVq6 S+xOUHKqq0lOEcGUsl9u5JMhXyUmxBL0bcpbm3PraKefvNHKcMMTIkiIYH6JOZ/x2jvr3XxEolQHy 04bcIpw4rNcyVihdpwUFnueV5AGcQynDJyQVS8nl+K1W89fZ6PyHR0DeTFuB+DREZmealqsnOdvoc rNViY5DM3fbD4pT5fO79p5yY/U73vFCEdx1dryzM3y/azGrwGfLO6eMnIJU42TIlaqBHm8TWbtxFo VhiAA4wxeBBU73AxQCjlm2RYq6mibhiSfcLhH9/AkgxMkCYmcYUrGOQuazl7ff+dWAYnPxe6yW3yn +8j1jBrQ==; Received: by zero.zsh.org with local id 1qYUle-000FxY-IH; Tue, 22 Aug 2023 17:02:10 +0000 Authentication-Results: zsh.org; iprev=pass (hekla.abc.se) smtp.remote-ip=158.174.61.227; dkim=pass header.d=abc.se header.s=default header.a=rsa-sha256; dmarc=none header.from=abc.se; arc=none Received: from hekla.abc.se ([158.174.61.227]:21694) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qYUkl-000FGy-Jm; Tue, 22 Aug 2023 17:01:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=default; bh=6G/zV+esej oLCIelA8RLtQvi0V9EW9yqTu3IiFLn9fM=; h=in-reply-to:references:subject: cc:to:from:date; d=abc.se; b=BDz4zfpsrXvbYzqBlpnpLCtvsToDr0JeDgK52ay9B F0EkrIy23Vk8O8AD+R2vFbTFjK0EOSOCgh7uib9+pbHg2FE4J0AM28OQzqGkKf4vWHpE12 9nHg8mxHJf/pQS1b2ecW1wjDSIiPhWWSKwPRzIRXuxs/xRBgfvX6yjZm4fpjSQwcWCnBaZ z+IpwDfsQaCoWfY6piwXQ0eVk5rD8l5DKcZyxweuRJUvZ56Q0SESOCivnW7bJDkEodaGbr qJCKhY3D2U75CzIlRX2j7ORLWNEiA8ieSBiuoeWnrZD9wKc8xb58Fe9A+JadIz9IrNz0nJ qyYOG34TNZFi/ho3nLAlQ== Received: from harpo.local (94-255-242-14.cust.bredband2.com [94.255.242.14]) by hekla.abc.se (OpenSMTPD) with ESMTPSA id 1a143d1b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 22 Aug 2023 19:01:13 +0200 (CEST) Date: Tue, 22 Aug 2023 19:01:11 +0200 From: Andreas Kusalananda =?utf-8?B?S8OkaMOkcmk=?= To: Ellenor Bjornsdottir Cc: Budi , Zsh Users Subject: Re: Help find Zsh' Bash `read -N1 -p "Put here " var Message-ID: Mail-Followup-To: Ellenor Bjornsdottir , Budi , Zsh Users References: <4D5D2C80-5208-4E28-98BD-B6C851F178DD@umbrellix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4D5D2C80-5208-4E28-98BD-B6C851F178DD@umbrellix.net> X-Seq: 29186 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: On Tue, Aug 22, 2023 at 03:34:18PM +0000, Ellenor Bjornsdottir wrote: > The snarky comments aren't well appreciated, zeurkous. Please don't chastise people for thinking GPT can do things it can't. > > OP, GPT can't help you understand or accomplish this task. It's just a language model and it doesn't actually understand anything. It's been missold as this super app that knows everything. > > What are you trying to do? Are you trying to read a single character from std. input into ${var}? (I opened the Bash operator's handbook to page... this thing https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html and that looks to be what you were trying to do) > > If I open `man zshbuiltins` and scroll down to the info for the `read` command I am told I can pass -k and a number to `read`. I think someone in this thread already mentioned that, without explaining how they got that. > -- > Ellenor Bjornsdottir (she) > sysadmin umbrellix.net A little tip that may help with finding the documentation for zsh built-ins: if ((${+aliases[run-help]})); then unalias run-help; fi autoload -Uz run-help This will make the run-help command available, which will present the manual page for the command that you give it as an argument (including the correct documentation for zsh built-ins). According to the run-help source code: "Figure out where to get the best help, and get it." -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .