Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Comprehensive comparison between zsh and bash
- X-seq: zsh-users 24020
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: Comprehensive comparison between zsh and bash
- Date: Fri, 5 Jul 2019 22:31:06 -0400
- Cc: zsh-users@xxxxxxx
- 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==;
- In-reply-to: <7aeeabc8-0375-1793-c8a0-1b3af235f1d0@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc
- References: <CABrM6wk343Pqgt7GnRbjqDmomkQ7VYLvpcB6OnBx9DU95SFoPQ@mail.gmail.com> <7aeeabc8-0375-1793-c8a0-1b3af235f1d0@eastlink.ca>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author