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 4232 invoked from network); 2 May 2021 18:00:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 May 2021 18:00:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1619978416; b=VHTHQOlK5TCg/gqI+/kv9mcOet6rtYVc/weqiYTbZSAyP7gZTD9e6H2uG2HmGRVkpw1AFAEI15 a/O+elnYBOtKh8pDJ5hgCPlNo5Z98FXVk4qBmnWV0HkQq/8FsLFJ0/b+BnhUIYu6WEdOTp9B9c 8B6s0gPZHMxCQmH7252BtvwKe0keyjPwygY/8qWnsatcXzXWdQ+p8hyls3j5qjRk00djmLxibh FutNxugAO68NRVS3D8K5nAUIELnytQh4Ir6AG1NgFclVYvCL9J1fSU3u5hSstEHBOGD6bVPCWj 9jNPIOMhpLy26D8+4hwavlkf0qtaaHb3DysbIW1LmJ09aA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f45.google.com) smtp.remote-ip=209.85.210.45; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1619978416; bh=9VkwVokjhGKdDd85derFB/zSmWwPqMSq0u2J4MDM1Eo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=Kj36YYJsIZov33v7iR77gvuMpAangN1ZnHVDFuPGxNZe//zxov6uzchMZqzNGK0EtQb1x6jxBS cN6HKrI9RgzxBb8/BFRe32tGnP8ZJglrqExy6h2zHp/dtQ0buxlEk1ehd15jfrMjeVR+mxedUd HSWh7JORzspPzBKR0wL1KnmF2/5t2mMjN6N0mr0upL7gzHcnip8d1zhQG6ngQp9bTSxNE+Un1b rcU4ILt1UPlzVmhMMiOOBb/huaZcsbGpGsvV5+oZ+BVJphS4vAAmSj6/iviNmiYGJ6hbHVabHR sC78xIcRgi4+TphuzDbYa2eLfDTDkZAfPtOrkJ05rIaJeg==; 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:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=jd1iJtPzQhjPkpY/m/VOWonksPbFxFGx2TWcXnDEKsA=; b=KQnvzHtLSBh6Hja/W+dDwM2PTx E6bpSOF8txckte6GAL+RT3g5fFXZrAm8MFqgNGXkaKxSRbGPER8nw0NZfKpafUA2TDs0Dy3WPh3MH tDQk4FYSl8lPw4VTbI0gP7lcqWGtYaWp/KlAIoUsrA5OuhR5LfZ83taP/HoPUjDKvSPxyFXZpEx+K odcXbW6S6wa+Moh3XQGPfZrMzNk8wXwLCQKeF9H6X4l/JRjE+VcdSMTuzTdOwJXa3lInjqYQi9EXO UDY4Z/RqjnnZs7MdJ8ZfPMAA+7T6RWVXNowyBs+KoFYxQBIQ/PPgKk8ja8brfvQ4MdPuCficwwP2j 7x7JFlag==; Received: from authenticated user by zero.zsh.org with local id 1ldGO8-0005eP-H9; Sun, 02 May 2021 18:00:16 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f45.google.com) smtp.remote-ip=209.85.210.45; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f45.google.com ([209.85.210.45]:38529) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ldGNp-0005Ma-Js; Sun, 02 May 2021 17:59:58 +0000 Received: by mail-ot1-f45.google.com with SMTP id q7-20020a9d57870000b02902a5c2bd8c17so2482562oth.5 for ; Sun, 02 May 2021 10:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jd1iJtPzQhjPkpY/m/VOWonksPbFxFGx2TWcXnDEKsA=; b=LSZKIlILyLwaKBlKP5AavkJAluNlo+TIovKxGRBMEPbwYTMEySBF3y0NDwvwkU635Y QApvj848H/y6YA1Y3AVf9sZmRexg0VgFzrTBnU+CpZAMK2OpyHMZs1cYqbrFyMJmN+Wp X2C9F+hGUEctKOW1sSwjpjznAqFZlz2kbHx8hS6kdKBOff6GiYEk+h2PiyciLNIViK7r Hc8Xzqr9dtetk3WAV5tdg0Bo+XFoiIjKBBc7QO3zRgywssxjqRhbqq+yMsHg+Pl6f8Dx Uvw4kSvfKaDlmRYfIGl81ZhYAs0PvlIEyuivdjw1xhgjSW4sTzOnuZik0Ksy3LC9LSba wZmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jd1iJtPzQhjPkpY/m/VOWonksPbFxFGx2TWcXnDEKsA=; b=AWazck3ZNjxhDKBlh3hYyGqsZJYy9cyxDvVK1w+UfH9QLubW88LEOss9wL8SdZJ8j+ z/TmqTyTfvkftedyuODwa8yHbBXfmePJ3K2Z2A2laZflLIq9DpOIVhVXm2+kve65o0dg T1YtBXkDwkKU8fj0hfPoQ/I4+T0elwKdWMHA7LeEZWw+cc27VqrqrYk3vktFeULzsjLd EbkmCFC4kO9xRGCvc3poMRXXtTrSbSFcyOY/ehopC/1JEZFU6nodKTMPW0mIGSqv8w04 9C4j53RPtqagQ+vbaox1Qp76CG8buRwDt2xzlVddcJNnAv2iPz6h1YTS4/2K0X2ht1Pn xzpg== X-Gm-Message-State: AOAM531xNbzmugjnPeTbbFH+xg+6VP3lV3Wpd619cJTtQKAJ2Wri7Glm hvBJdMpLFbyc4eZOeSY6Jmytg9c+8QZzrpUo6s7cBA== X-Google-Smtp-Source: ABdhPJxHSChWvFujheiA5BJZ8x6gbm7gtuKp+ChbfWysVSck+eD4FVVWkZCjSP5bt1HWsr6HG/XoudWowj2C6BpIux4= X-Received: by 2002:a9d:4d9a:: with SMTP id u26mr11685657otk.161.1619978396224; Sun, 02 May 2021 10:59:56 -0700 (PDT) MIME-Version: 1.0 References: <7E71FA83-356E-448B-9726-02DF3FF5BD14@gmail.com> <873D08A9-F321-474A-8440-CCE7DCCBA529@gmail.com> <20210414120551.GA3882@tarpaulin.shahaf.local2> <20210415213456.GE6669@tarpaulin.shahaf.local2> In-Reply-To: From: Bart Schaefer Date: Sun, 2 May 2021 10:59:44 -0700 Message-ID: Subject: Re: [RFC][PATCH] Reset ZLE hooks when changing prompt themes (was Re: [RFC][PATCH] `newuser` prompt theme) To: Marlon Richert Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48771 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 Fri, Apr 16, 2021 at 3:38 PM Marlon Richert wrote: > > Attached is a new version of the patch that handles _all the things._ \o/ This looks OK, with two questions: 1. Subshells have been introduced. Those won't be treated as interactive shells. Does that matter? 2. This bit in the restore style: + $( add-zsh-hook -L ) + $( add-zle-hook-widget -L ) There may not be anything to be done about this, but unless I'm mistaken that just re-adds all the previous hooks, it doesn't remove any? The code it is replacing clobbered the entire list of precmd and preexec hooks, which I suppose also might also be wrong if anything other than the prompt theme was manipulating them.