From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18045 invoked by alias); 4 Sep 2015 16:02:19 -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: X-Seq: 20509 Received: (qmail 2868 invoked from network); 4 Sep 2015 16:02:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=7Y6FrJQExBAT+1dvTtQ6Nw==:117 a=7Y6FrJQExBAT+1dvTtQ6Nw==:17 a=N659UExz7-8A:10 a=BFamb-RLMIxkXBuMKWcA:9 a=pILNOxqGKmIA:10 Message-id: <55E9C085.2090301@eastlink.ca> Date: Fri, 04 Sep 2015 09:02:13 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: can we detect the closing of a terminal? References: <20150830201324.309d36b0@ntlworld.com> In-reply-to: <20150830201324.309d36b0@ntlworld.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit Gentlemen: Whenever I open a terminal I have a mechanism for passing to it knowledge of the current $PWD of any other open terminals. It's cumbersome but it works. Problem is that it's a one way thing in that when a terminal closes, that information is not passed, so there is orphan information. Is there some 'pre-close()' function for terminals? Sort of a suicide note? Or it might be about the same thing to have a function that's called before a shell exits 'zsh-pre-close()' , tho of course there can be several layers of shells in one terminal, but I guess that one can test for the 'zero' level shell in any given terminal. I'll bet there is one for the shell, but for the terminal that might be wishing upon a star.