From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 635a9fa3 for ; Sat, 6 Jul 2019 02:32:07 +0000 (UTC) Received: (qmail 1704 invoked by alias); 6 Jul 2019 02:31:55 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24020 Received: (qmail 23093 invoked by uid 1010); 6 Jul 2019 02:31:55 -0000 X-Qmail-Scanner-Diagnostics: from mx.spodhuis.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25496. spamassassin: 3.4.2. Clear:RC:0(94.142.241.89):SA:0(-4.3/5.0):. Processed in 3.957354 secs); 06 Jul 2019 02:31:55 -0000 X-Envelope-From: zsh-workers+phil.pennock@spodhuis.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spodhuis.org designates 94.142.241.89 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201905; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dxQ0D/WfrIoq6Wd70OvvfGWU3eOhV6pn67ebkgRSvwY=; b=CoXdRfAr8bGPBHG69KROPwfrb7 XWlzdX/1Uw/G7wbAldFQq+9bMB44XefAZi8g/H0NzORV5iKq1Mg9imvs0VsOy4ZE5sCvzv7MBQ0t2 zjQEe4FpjAj8i6CVBN35qYOiNkZQfOYOpWmEYPBuzwm7nSgmt7L6szxh2w2ObYYiMLwoXN3oVKExz z9pfVlVuEvvGEs/M4iIf0Jei51lU7ne3oXftAkHVcWVQhGNzeFPhnDnScVOq554262SI0cKkXHNxZ SDeSRnIYN4QWZgwO6SgIwXVxJgFyVCG0S6HUjYeoPwgf/Z3jkCQ12LQDw5EbgaX6TtDHG2/xsi63D s558GsiQ==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201905e2; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dxQ0D/WfrIoq6Wd70OvvfGWU3eOhV6pn67ebkgRSvwY=; b=3JK8GAbThVQwHRhOA9gw9V8c4G uuoqSg/qgT1BqqhgxRof55IAIvfm2hiRbI+JU/eQYAtr7P+IzQSY0o/ReECw==; Date: Fri, 5 Jul 2019 22:31:06 -0400 From: Phil Pennock To: Ray Andrews Cc: zsh-users@zsh.org Subject: Re: Comprehensive comparison between zsh and bash Message-ID: <20190706023105.GA2314@spodhuis.org> References: <7aeeabc8-0375-1793-c8a0-1b3af235f1d0@eastlink.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7aeeabc8-0375-1793-c8a0-1b3af235f1d0@eastlink.ca> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc On 2019-07-05 at 13:29 -0700, Ray Andrews wrote: > Just curious:  Is there some way of dumping the state of all variables at > all lines with both bash and zsh to some file or other such that one could > quickly spot exactly when and where something might change between them?  > Not a proactive, analytic study of the code, but just a pragmatic finding of > differences after the fact. `typeset -p` dumps all variables; the format differs slightly between shells but that's light text-munging to normalize. This is probably a good start: trap 'typeset -p' DEBUG although I'm not going to promise that the DEBUG hook is invoked in exactly the same circumstances in each shell. But that should get you going. It will be voluminous. You might consider: mkdir -m 0700 -p "$HOME/traces" exec 4>"$HOME/traces/$$.log" trap 'typeset -p >&4' DEBUG You could use `set -x` too, to see the commands being run, but while bash has `BASH_XTRACEFD`, I don't think zsh has anything quite like that. So you're going to lose stderr, or accept differences. -Phil