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 25719 invoked from network); 17 Oct 2022 15:37:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2022 15:37:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666021055; b=gOZCyeVLYCITeNEQ9g1zD4v9NPN5FWzlzPdzUQKu2UMPP1M+/G8t16hS++TaPfXVtsgvVC7oeJ Y9BJDYa2bVUUazcLIhDYCTIWCzcSqKdLcJTsuQGEZ9G3nlhJLkc/a+GLn3MyNk54i3H2mlL2rO adz3a5GYb9sxySpiLpAFslkxL+n5S8Lh3fXdRPDd4kYYxbJqMI8HrCeqPs/h9x/AaJf5xZggxo 7OVYGlcj96hwNcMNmhjAKXFFXdSPz2RR1JY7+qyzojQUiQZwf/XKL3UxOgsIXvCIk1gbOrLvj9 qEV6U29YsxGtKFZNtrRuQabw0ZYJB2iF8gjrg3/E15v+/Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (gatalith.at) smtp.remote-ip=45.132.245.72; dkim=pass header.d=gatalith.at header.s=dkim header.a=rsa-sha256; dmarc=pass header.from=gatalith.at; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1666021055; bh=Wa53G1cJSUxV7NxLX2P9dgBmhUZEl4p6qyhGrx4zcUo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature; b=J5Y1AgXCZCtF9P4uY6zit37K/ICe5yejAmrvx8wjdii+tbAsEEpXb6SFF9e0ekBNMXF3Ai4w5m jNOZdHrSmi5EKGbDSlSAywpExHe+03O8W/yBfLL8L0MO+IvUPBkZjnt8b1TMVzyj0vKYMBfQEf S+MFci2NCjFbVlX7NwD2e/rDF/60Vp4FKhSJTHH9FWuUMoS+Gk/8BVewpB2u9+Fb8zfSPwrtVb ULhgYi3NyTkEoHU5KJT1G+XeZl9rnUG96U/6ZGUvRRtuttiYB3oTfzAZfn3cIXMR526hsvXdh+ 6A3luz93rxGQZLOypFl/uH9nOPHE6ZDdZp7uXdKHYfbk3Q==; 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-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=z6lUDIDbC2qjinp+hQKphYRyhCLp6jQM7UyYTi/i/NY=; b=XOo7i1dGCw10/Y0h2zjhL3rfuW hVSMmzfyLKoTdAwJACCEDwHSMb1Z4z+TQ54CFkX85eKoOWC3JNDv7btWvuYDUnTMZUJZ5zSW5vWi/ VO3DgC9TyDt6agf08gx78NpreQ0S1b0EQFNfC1o8+PJW4PEEY8bupeCPGUqcv1MxWpZi4PWp0kbOF 4Hvfev4r36Fl7PMY490rRo69aD5giE/SRcezBXDRwedbWDx7L4uNAQyKul29S6w7bm488I1asNxP4 583lUZ2Njh628LzLY/Wf+pO/Z8/qNAP0os9AzkyqTtdDqaFPNBACtQo9jHv5oea94wB6AEic1dag+ F+DbQz9A==; Received: by zero.zsh.org with local id 1okSBK-000BSb-Bp; Mon, 17 Oct 2022 15:37:34 +0000 Authentication-Results: zsh.org; iprev=pass (gatalith.at) smtp.remote-ip=45.132.245.72; dkim=pass header.d=gatalith.at header.s=dkim header.a=rsa-sha256; dmarc=pass header.from=gatalith.at; arc=none Received: from gatalith.at ([45.132.245.72]:59719) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1okSAB-000B8K-7X; Mon, 17 Oct 2022 15:36:24 +0000 Received: from yt.nih.at (2a02-8388-0bc1-1580-92d1-0456-cebc-330d.cable.dynamic.v6.surfer.at [IPv6:2a02:8388:bc1:1580:92d1:456:cebc:330d]) by gatalith.at (Postfix) with ESMTPSA id 70E2E390A36; Mon, 17 Oct 2022 17:36:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gatalith.at; s=dkim; t=1666020982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z6lUDIDbC2qjinp+hQKphYRyhCLp6jQM7UyYTi/i/NY=; b=qQbtZsjIzxLDAoajRwa9HBk8J9aM9D72OPTL4XCKBJQtl6WX8/Tpve9nrfk0HsbY123Gpu RopGh/UyPin7zP4sZCTLExm1HvhdCNDD7WOusaYnJ8DegtUwbNgG+OzeMzBoZ/7lS70aEL SbonRFNXrt1nqr+U5/WLTNu9eP0W1SU= Date: Mon, 17 Oct 2022 17:36:20 +0200 From: Thomas Klausner To: Mikael Magnusson Cc: zsh-workers@zsh.org Subject: Re: problem with 'ls | less' shell function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Seq: 50788 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Mon, Oct 17, 2022 at 04:50:20PM +0200, Mikael Magnusson wrote: > On 10/17/22, Thomas Klausner wrote: > > Hi! > > > > I recently noticed a problem in zsh 5.9 (as built from pkgsrc) on > > NetBSD 9.99.100. Since I didn't notice it before it could be related > > to a change in NetBSD (I'm following the latest version), but I've > > been told that the issue can be reproduced on Ubuntu 19.04 and FreeBSD > > 13.1 too; but not in zsh 5.8.1, nor in most other shells though. > > > > The discussion on the NetBSD mailing list can be read in this thread: > > https://mail-index.netbsd.org/current-users/2022/10/12/msg043076.html > > but I'll summarize the issue I see in zsh here. > > > > I have a shell function I've been using for ages: > > > > dir() { ls -al "$@" | less; } > > > > Recently, when I tried suspending this with CTRL-Z and then resuming > > it with 'fg', I get: > > > > $ dir > > (CTRL-Z) > > zsh: done ls -al "$@" | > > zsh: suspended > > $ fg > > [1] + done ls -al "$@" | > > continued > > zsh: done ls -al "$@" | > > zsh: suspended (tty output) > > zsh: done ls -al "$@" | > > zsh: suspended (tty output) > > > > The same thing works in NetBSD's ksh: > > > > $ fg > > ls -al "$@" | less > > (CTRL-Z) > > [1] + Done ls -al "$@" | > > Stopped less > > > > or in bash > > > > $ fg > > ls -al "$@" | less > > (CTRL-Z) > > > > [1]+ Stopped ls -al "$@" | less > > > > If I use '/bin/ls' in the shell function instead of 'ls', it works > > fine. > > > > Any ideas what the issue could be? > > The last bit implies that 'ls' is an alias or function, can you check > the output of 'which ls'? No, it isn't: $ which ls /bin/ls $ type ls ls is /bin/ls Compare to $ type ll ll is an alias for ls -al $ type dir dir is a shell function from /home/wiz/.zshrc But I take back the statement that it works with /bin/ls in the dir function definition, it shows the same broken behaviour. Not sure why I thought it worked before, sorry for that red herring. Thomas