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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 51691d10 for ; Tue, 30 Jul 2019 22:19:46 +0000 (UTC) Received: (qmail 15715 invoked by alias); 30 Jul 2019 22:19:31 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44615 Received: (qmail 12593 invoked by uid 1010); 30 Jul 2019 22:19:31 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25524. spamassassin: 3.4.2. Clear:RC:0(66.111.4.28):SA:0(-2.6/5.0):. Processed in 23.234286 secs); 30 Jul 2019 22:19:31 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type :content-transfer-encoding; s=fm3; bh=VIlP+JAEUOcGCzHKr5q9h90yZG Bhb9a4kcpBZfwtti8=; b=X3pnEQtEqAOUwiegCIjpKMvTrAkuT7fZbRb+nfZKqH /6dzhyM5NqUrVm/9DS1uqYSi2v6mtaWYo1aU90JmERlolsCHwP618dwVTsm2GBrz usy2yOfO4V7trR7kemIPJeIHHi2AjtsqgFVFiS5TMVoVzySv11H+GWN/G9qfGn4j ysjRW8FG9xESsRw8pJLA3LS5WYjMwcFYtiFgs0r+Azz9lIHEyzxTIBhHj8t4NwHx cMpDQyXtWr1csRGVoE+ewIxCGdIuqtAQgBrdxwOoeiVEgang9QXTtmCpqD7XanwN Brn2CW50/RaL0eJiR6AdD8O/K5M471Ah2GDBJ2W0JJUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=VIlP+JAEUOcGCzHKr5q9h90yZGBhb9a4kcpBZfwtt i8=; b=gLFQEw9lZQaF1utgNZCR2EifW23dFLHoTnAoAXkYSbv0h1mWB54ERTGIC kbLUoQGNhKOA3lcj+QKLr99Seu3NfKgpVnjpkYBAextcj49o5CXUfsD9oit7BVgm XEm6Bv47lAI8IBoRCN2AlWnG/QN+PwG6eHP+37prcWPIRO40t7VEWGfppOJ8I1tT aiT3idFwmthCsA088WGa9bnwzz2InvE3khdoQjUkFutn7ZuSGgCaQeKhgBp7ia51 bY09PYuOH6xzRtE7jFHTyNNxSsa6+x6JNDoC1F4rjzSoh9h5JQfgJOxp23lNhs02 m7jnam68RLDoHqCTV/WyDhmCHk6bA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleeggddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgsehtqh ertderreejnecuhfhrohhmpedfffgrnhhivghlucfuhhgrhhgrfhdfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfrrghrrghmpehmrghilhhfrhhomhepug drshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgep td X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.6-799-g925e343-fmstable-20190729v1 Mime-Version: 1.0 Message-Id: <49013421-774e-4389-a25d-680f1d97a8ef@www.fastmail.com> In-Reply-To: References: Date: Tue, 30 Jul 2019 22:18:31 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: =?UTF-8?Q?Re:_A_serious_bug_in_execution_=E2=80=93_where_to_debug=3F?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Roman Perepelitsa wrote on Tue, 30 Jul 2019 21:46 +00:00: > You should call `emulate -L zsh` from every functions that can be > called by any code other than yours. It's almost impossible to write > code that works the same way with all combinations of options. In my > public code I also unset aliases. These defensive measures reduce the > number of bug reports by *a lot*. People really seem to like creating > global aliases with single-letter names. z-sy-h also does 'emulate -L' and unsets aliases. I wonder if there should be a built-in way to do this, in order to make it easier to write= plugins? Perhaps a =C2=ABsource -U foo.zsh=C2=BB syntax, as in autoload= ? > I'll probably start calling `disable -f` for all builtins I use. I wonder if you might be throwing the baby out with the bathwater here. Aren't there legitimate use-cases for writing shadowing functions? For example, what if somebody does =C2=ABzle() { typeset -p funcstack >&2; z= le "$@" }=C2=BB for debugging purposes? (And yes, I'm aware compsys and z-sy-h both use 'command' and 'builtin' = in places..)