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 3412 invoked from network); 1 Jun 2021 06:00:29 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Jun 2021 06:00:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1622527229; b=tlCZ6edoiQSkPgC3uFzes0Dcj/l/mu0OGP/jAtWGCncd9q/rt+1YV/WgmcZuqgnB9E38KjcU8M C9GHH96Ke34HTp30TZhZje9sENRfMgdqSkcwZaDSywsLRm2AcZ+QSxPdbKwdPS3B+jWuYo7t/m s45a4dFpLvxBrdhL3YoeCLV+mUjX4nrxTmy2L1V/YsVe0wMyO2q5aQYbJFeKrji40c9NxBx9cX abtm5qbE+TUdl9vOkZTgNF2b83A8Ene8+IOKmOEWR4ONGYcIHd9vUtwyMC4d0QtZ7bTYCP7/Xe kOEtYvvGtu5PIyg8RTJAD9wPuutNAfv3FoCm63c+uOYMPA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay5-d.mail.gandi.net) smtp.remote-ip=217.70.183.197; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1622527229; bh=fdLispzYo1JPMT0djOROwDsdzXvUON4RA/TE3A2Btag=; 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; b=s6rHZ4egs81ieOjrSYE/HNryuWDlz9Nw/vCmmhptn3NhoG2RPI68nAn2RjO9ovB2UYebYS2AH6 Q2iTJOby4CADQUx23/UaZV0/8AkQszJGLmgEWWB0UxFQuNc16tjh9THUIKVTFyZhsxNzKiJorW lQ2UZ0WkB0UTsg1GwFZ5g9z5S+rKU5aCgVpT8VAYOB9Db7la3q3RX984rUFOyLJjgj8ky/s7ke 0S7xGME1V5BzigXtD2jlFrMSFYNmCMIBQmtiNVNM+/BMFRbn/tRIOddKXWngVtAviLrZtehxEa uPkAy8bgIe7k13CZ8ooehMuG5YO7q2J3pxdDMXBB5gZtvw==; 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: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=ZrPiwYYan8V4N6EwgN8hO/WDCM/XtPxFyVZHuk4TwVY=; b=YdjJpc3lq4G6aZmFgf3mnCU7BL 6ldsxnON8MskXBbz/7JPXHraGOsd3vYv4iG28/EqJLIEeXnZn4O5a8hkV0sqrcZwpKJdSvAEdHaCA qIIP6ugNURpJGPApcd7TxeCoaKoA/Jmf5vublTZn2NvJqS9XVl8UoAO/VQRgbp9nb/KNXnH/XRqcr h5XbPwB/8OH/MEXIE5/hFGJ5BaoppSGRtbonq7woIf26Fr2F19Qlp/Efloeu7bl9AUQt3/UClN7RC 4wLnogw+8qb6BrGBVFidz9DgNowX1FTR7hKz4oZkJijbigKCeqJYv+IZ2aH4fSLt4KAo0GGgpGUZ+ 3I+G6nTw==; Received: from authenticated user by zero.zsh.org with local id 1lnxS0-0005k3-3W; Tue, 01 Jun 2021 06:00:28 +0000 Authentication-Results: zsh.org; iprev=pass (relay5-d.mail.gandi.net) smtp.remote-ip=217.70.183.197; dmarc=none header.from=chazelas.org; arc=none Received: from relay5-d.mail.gandi.net ([217.70.183.197]:49481) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lnxRU-00051Z-EH; Tue, 01 Jun 2021 05:59:57 +0000 Received: (Authenticated sender: stephane@chazelas.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9A3901C0005; Tue, 1 Jun 2021 05:59:55 +0000 (UTC) Date: Tue, 1 Jun 2021 06:59:54 +0100 From: Stephane Chazelas To: =?utf-8?B?UmVuw6k=?= Neumann Cc: zsh-users@zsh.org Subject: Re: [Review Request] Arrays and their usage Message-ID: <20210601055954.p6bvpbwalbtns5tx@chazelas.org> Mail-Followup-To: =?utf-8?B?UmVuw6k=?= Neumann , zsh-users@zsh.org References: <26fc6ecd-4a05-e562-7274-ba045df536bf@necoro.eu> <20210531173651.2pfklkhv5zizfldg@chazelas.org> <1eb8dc21-eb40-cc32-4ca8-c049d7273a03@necoro.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1eb8dc21-eb40-cc32-4ca8-c049d7273a03@necoro.eu> X-Seq: 26758 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: 2021-05-31 22:04:44 +0200, René Neumann: [...] > > makepkg --printsrcinfo | > > sed -n 's/pkgname = //p' [...] > (NB though: The linebreak for the two pipe elements was inserted for this > email only, with me hoping, that backslash newline was the correct thing to > do ;)) [...] \ in front a a newline removes the newline before the parser interprets the code but here, a newline is fine, same as after ||, &&, ;, &, if, then, else, while, do... You can even have comments: set -o pipefail print -P - $var | # prompt # expansion sed 's/^[[:blank:]]*//' | # trim leading blanks wc -c || die "pipeline failed" At the prompt of an interactive shell, you'll notice that if you press enter after a pipe, you see: $ echo foo | pipe> Which tells you the parser is still expecting a command after that |. Where you might argue it's inconsistent is that you don't get something similar after redirection operators: $ echo foo > zsh: parse error near `\n' Or after "for"/"select"/"repeat" $ for zsh: parse error near `\n' It's not specific to zsh though. -- Stephane