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=-2.2 required=5.0 tests=DKIM_ADSP_ALL,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24321 invoked from network); 18 Feb 2021 13:04:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Feb 2021 13:04:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613653446; b=1rfgU991Xp/D5WTLzh5wNM+Ia0oRhTF+YUfI5snoxNsb7ryU/QFsQme8RFzz0Ykk9hTIPo8KIp 3e3miKStFKB5GJKtDB+mOONLmIFm9h3ppAnGhK5PfhEY9hQ22ZS89qGtE+JerEZA5Jsv6rpO3E w4xgSB8sTqa3N/Yv1coHiEBBqqpvtodf0iIRi4fueQv5vWHVYTUbIoT40YEvi+v9ZSGlOclDoW U46FNXD19Vh4zS8sMte6k3EFMXD+9pBPQGN7kq0bpXlFufKLrBljV9F07D6DHe4Wz8pfVJIsfr vFawExVGeXh4S0WaES4JiBI997/KnKoPrFCGtz3E1yG7Lg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail.cs.msu.ru) smtp.remote-ip=188.44.42.39; dkim=pass header.d=cs.msu.ru header.s=dkim header.a=rsa-sha256; dmarc=pass header.from=cs.msu.ru; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613653446; bh=WsZP0yDSHC/DI01f75Djq0cca41Q4/Kt0DVa3pBwmqQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Subject:In-Reply-To:Content-Type:MIME-Version:References: Message-ID:To:From:Date:DKIM-Signature:DKIM-Signature; b=kSZ0KNE6xcKc/hYv7VYBOy9+8PoM1GCWXCoiv38ZrG9ES8RO5mHOp7NV17h5a367l34HsyWw0R 8XEuCeFc6xo1nyUKQZMTBq0FYgtNE8/vqc3bDsOFniGUVfQxWr7/99BiNBxQYPEBxSNx7aQikq vMTDVRhfYWa6mA3aIiD1tanrR4Qwzir/cuQWXO2wESW7eJSm771ODLcFmE31EfsrACEyfS0vP4 Gt15Vl92bLOTg5ReVFdOCgGABPeHouUoTSL20/YebyYT+Yyppdq2lw5bXeJSYZavHbqv/L5/Wo Y68DzbdHdRzGXickrbree++TX29TZhESxEg+6Ru8CjwjFA==; 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:Subject:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hdp0f0Z4Dwj4yv3/bGjzeJCAXaRA14OkHerryLr2jHY=; b=M63gF4M+xV7+VCPF5vPdqQ8uW8 27qMm4GDuewLItOZL5j/H6FV91GcsKoA1f6C/JKshZZ3BqtySk2uQvUUtcC1gufHIHTHBHFH8ZsHE d9R96CIBfbKEgoIIskbxGWYHluud4J8eAp4oqcrx28dkT3+oVHS6g6dbP8iyFm9T5XqblUPOZ7o9t AKtAPv1rJjQmf8dtAoYVoB5wteuHZ53kkFj8zCyVgqh8KHtH77864OqIW08eJ+dmS2R49PthodEv4 AZ6/gmvVa1WU5P2caUE3JYYlsBbi+YT4a9BmGJXyoR2wvC2BbL5iM4xpLTtUHCAAk8JZIPmTjIjy9 MtXmwaGA==; Received: from authenticated user by zero.zsh.org with local id 1lCiyN-0002mm-Lx; Thu, 18 Feb 2021 13:03:59 +0000 Authentication-Results: zsh.org; iprev=pass (mail.cs.msu.ru) smtp.remote-ip=188.44.42.39; dkim=pass header.d=cs.msu.ru header.s=dkim header.a=rsa-sha256; dmarc=pass header.from=cs.msu.ru; arc=none Received: from mail.cs.msu.ru ([188.44.42.39]:39609) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lCiy5-0002dr-3C; Thu, 18 Feb 2021 13:03:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.msu.ru; s=dkim; h=Subject:In-Reply-To:Content-Type:MIME-Version:References:Message-ID :To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding: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=hdp0f0Z4Dwj4yv3/bGjzeJCAXaRA14OkHerryLr2jHY=; b=ZPExI8Pv/3g1RiUItEKCFMwXVh P137PCzsrhJBJ0CRsnd5KVjuibUj0OiTuYqFu2iteVSTepJMgRsLXXuW8MqAhcedSiOVVQjCDLASI i6J93Lv5p9IkRjUpedtNWVnG0//gMa94aZ4APQa4bnRZ7C8SCftu0IsbMd/0kOsB0DxWJHX0VxOAa yyn6ZySaRjjwnpxnmifcSkNeaNc5AnrgC5LEH5hyD6aVwF60XpR//rHpGJgUzKu8YzSgBTPkJ80BO /+QzjfoQYIXASztdJBBdIpn0/K5IeEnUxN/j3zt9we+WF1k3zSmnUEHPOUU5YNf0j21uae0bblmzH 1YGh+V7Q==; Received: from [37.204.119.143] (port=39372 helo=cello) by mail.cs.msu.ru with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lCiy2-000Eqh-PO for zsh-workers@zsh.org; Thu, 18 Feb 2021 16:03:38 +0300 Date: Thu, 18 Feb 2021 16:03:31 +0300 From: Arseny Maslennikov To: zsh-workers@zsh.org Message-ID: References: <20210125081625.3193714-1-ar@cs.msu.ru> <20210125081625.3193714-2-ar@cs.msu.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/zQMYCcT5stxE/Vc" Content-Disposition: inline In-Reply-To: <20210125081625.3193714-2-ar@cs.msu.ru> OpenPGP: url=http://grep.cs.msu.ru/~ar/pgp-key.asc X-SA-Exim-Connect-IP: 37.204.119.143 X-SA-Exim-Mail-From: ar@cs.msu.ru Subject: (ping) Re: [PATCH 2/2] promptinit: Fix prompt cleanups X-SA-Exim-Version: 4.2.1 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) X-Seq: 48080 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: Archived-At: --/zQMYCcT5stxE/Vc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 25, 2021 at 11:16:25AM +0300, Arseny Maslennikov wrote: > The Zsh documentation at Doc/Zsh/contrib, paragraph 26.6.4 "Writing > Themes", says: >=20 > Declare cleanup >=20 > If your function makes any other changes that should be undone when > the theme is disabled, your setup function may call >=20 > prompt_cleanup command >=20 > where command should be suitably quoted. If your theme is ever > disabled or replaced by another, command is executed with eval. You > may declare more than one such cleanup hook. >=20 > The promptinit framework fails to apply cleanup commands of the current > theme on any theme change other than "prompt restore", as well as when > invoking setup functions of a certain $theme as an implementation detail > of `prompt -[hp] $theme'. >=20 > This problem was previously brought up in zsh-users/23314, to no avail. >=20 > We fix it in the following way, hopefully without breaking compatibility: > * Rename zstyle `cleanup' on the context `:prompt-theme' to `restore' > everywhere but in prompt_cleanup(). It is only used as a restore > mechanism now. > * Ensure prompt_cleanup() continues to store its command list in the > `cleanup' style. > * Clean up before theme switch at the end of set_prompt(). > * Prepend every use of prompt_*_setup (which might modify the shell > state in ways that require cleanup) with a cleanup run. > * Adjust `prompt restore' to do both parts of the newly split restore > mechanism, cleanup first. > --- > Functions/Prompts/prompt_restore_setup | 1 + > Functions/Prompts/promptinit | 43 ++++++++++++++++++-------- > 2 files changed, 31 insertions(+), 13 deletions(-) Could someone please look at this series? --/zQMYCcT5stxE/Vc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE56JD3UKTLEu/ddrm9dQjyAYL01AFAmAuZZ0ACgkQ9dQjyAYL 01A2IhAAifTC7Yjcle6iR+UDUaglAavXEbZSvcvPYdDhPFf4iByz0zs8ZmO14hO5 nLAGxiXof1jJceYWZfnBa6CdZvc7ndvdwzrFxEQIOWt+4FVPwpWFYYW04MmGOXU2 VKoCcSgNHOqQD3AOvisnhjH9SnWEDazJLsYok5KceMhUvq5UnPOp1eQtvtzAzL0g 7bFDgr2kMLqpMg4YvX+fsNIXoLIGKfCSHw1HA04XyYFhMeM0TtMFrTX+qUKx8wpl Xmu++Bh1QdmemCLYXAAQXX1/B4X2C18WrvrZFMAKCKKc65Da0Xgfazs8KAYXMZM7 Pu8Lotmhjw9FfBvf9OqnGzypOwgEipjJnfu3zyj5pYIHTOmX3D95RERxkz1mwVpX Mv0PderTQ5TdhjO5MYHcRwCk7ZWUVt0UGThidjy0+mPKaIW7pM7BKvg1NeUS2cha z7LChmZgpZ+9ec4r1XQrZykwCsCSrhcaTtd2JEAmcFxsctfTVOdUKqECMJQ0Vuh0 qlJzNcfpYA9coFy93AeB4eS9ia9fktSbhcX71Ohie+F5eQmjSwpBl5YYmMFQp7/b wdfXIvnLlbelKvf+XpG8HjR+QAZ6Wj8xGIAAFWda+iY6xJYoXD//39nfBLXSbA6x tJT/Xtie2lzh3OJJ6wkMtcrNI4L2Cj/dgL5kKZDJdsy6YdommS0= =3Hyw -----END PGP SIGNATURE----- --/zQMYCcT5stxE/Vc--