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.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11433 invoked from network); 4 Aug 2023 16:47:46 -0000 Received: from zero.zsh.org (94.142.241.90) by inbox.vuxu.org with ESMTPUTF8; 4 Aug 2023 16:47:46 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1691167666; b=R/XOB8LQmbvTE2qQ2+MPvEq18d2ZCMtn8SP45Q9STSiG41wQSyWXbHkPtgVgzYf+zZ+MWSngOu zjxvXhzlzUOBC9Z1/Ab8GgD8VtPq3m6sDKUKA9Yak+rtF0I+WqA00IZajmsO7p29Bn57+YchVo O8bIEhCOFKXZAdCGdWM53svnKP9gffvqfUz+fyfw8fEMhn4Fe6UZrSlPrSA9V44rjQfr5+9tzv EHV/82q0cL8LNo5RyQqVtra+YjvfNq9mYCCWoMULTbo18vpzIpUAxlxHQLYvfXmLD6h1NecDYe whUbhouwljU360j1hXpz4aUkolFzE57jN32cpHCw+IoJzg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (racky2.crushedhat.com) smtp.remote-ip=50.209.93.117; dkim=pass header.d=crushedhat.com header.s=default2k header.a=rsa-sha256; dmarc=pass header.from=crushedhat.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1691167666; bh=dRPUXHYQtv7rE2r209q46XKcRl7UQiJ2flsE5P5O9Hk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=V51N6wWXFTkwmx98Pwas0MxdsAE3ifgoJ5XbEqhknWTbF0MmEyggfozJ6H749dWvig8VdjNEnp rcCp9n9QkFRd55ILcwg3gwceedj45/fxU7GG9y2VwnV99lY3J0dXLdEfKcfmKRhgHD2Jfv8ajS HCYYKqn89jqoW2OZEfdWn7LDBBHRQfZkDXCxXFYHXuSBu39Wqi+wxlTRj1FXRH4AlXRROJ2GRN CnkMYMBifRsitlmBZrFUXZdrXOo5grmWgjkhmnLOOJdbOGwE0KdGIdgtZY1u+R5XCX4X6WXdYg qUoPeHqKAT/EUS8XgdFCsKqpWRkhqe4PdbM7/pabfx7O5g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ywXL2OFCpwl+13dPkVGAiox5nXG+e5BwPOazKhX/O3s=; b=NRIVOOq0gBji/u1qZBlQROE3YB D9Ex2mDLXv07/GN2rkL1HLcFtgCNM9wlLXOATHa/b37D4HW1HBDtriDDQimd0y+R21n9cN8yCmTVr 1uGswmvt55woOX6JWHxsjOX862ZYKnxrWoyzREnI7+/BMkPq9WjEozbHlLW+vZgVlHqXWSGrMlfzJ WMw7XRPeSQSAx/WbGj91fdqCIZ3ihz35e7LBjRRZNWqYscpJJRF/6ap2BVsYJtUxxKNKkEjiI/nTC lIWdjCATAN/8n617hGichNtQbRRy9a1EFDzT8KgVdJJlB+2os3zvwTCRQST2OXtOEDQDEMeJxvYka 0ZgD99uQ==; Received: by zero.zsh.org with local id 1qRxxn-0006HR-Gs; Fri, 04 Aug 2023 16:47:43 +0000 Authentication-Results: zsh.org; iprev=pass (racky2.crushedhat.com) smtp.remote-ip=50.209.93.117; dkim=pass header.d=crushedhat.com header.s=default2k header.a=rsa-sha256; dmarc=pass header.from=crushedhat.com; arc=none Received: from racky2.crushedhat.com ([50.209.93.117]:46328) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qRxxC-0005y0-Dp; Fri, 04 Aug 2023 16:47:07 +0000 Received: from [IPV6:2603:3006:10c3:e100:e23f:49ff:feeb:21a3] (sheba-ipv6.crushedhat.com [IPv6:2603:3006:10c3:e100:e23f:49ff:feeb:21a3]) by racky2.crushedhat.com (Postfix) with ESMTPSA id BC37E6D3647 for ; Fri, 4 Aug 2023 09:47:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 racky2.crushedhat.com BC37E6D3647 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crushedhat.com; s=default2k; t=1691167623; bh=ywXL2OFCpwl+13dPkVGAiox5nXG+e5BwPOazKhX/O3s=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:From; b=SZgjDHJCypHSOH4/Gul8z5qETeUCxNRxYhrpXqS7imziN9SlA/Qj9gycH8Mz8i8Zv EqsoqeYKe0JASKeU2wxLQH+NscLw2WbCJtCIxS5mqBONC+jMJU63hhwsfZrDmesJS5 NmuxCTuOQ2YemYQPtxf/Gfa7SdILhtMxF0zJ/B85aKFHEiD35nkYSd3ZBHrK2Rjd04 IvU5afRcl4k+o0ETbVg7BGRZ6r13YaQC8p3uKAZfmCa39rP3hO9jRHqubgdjTBgL7C 0l5oQmdQcIrtskjZ8mMjC2Kas2Twdv4fnt5Kw+ZubB1Gtc0MmVlKeNhH3ySU15rr4K eFo2v40Ik+ofg== Message-ID: Date: Fri, 4 Aug 2023 09:47:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] Add option like tcsh's dextract Content-Language: en-US To: zsh-workers@zsh.org References: <3a8e90b4-def1-bada-c118-68ddc1245972@crushedhat.com> From: Tim Eliseo In-Reply-To: <3a8e90b4-def1-bada-c118-68ddc1245972@crushedhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 52021 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: I posted a patch back in 51958 about which I haven’t seen any new comments or commit activity, making me think it got forgotten. Does it need further clarification? Maybe the one comment it did receive, which inferred that it was redundant, caused it to be dropped by the people who do merges? As my sample workaround script illustrates (which, BTW, I don’t intend as part of the patch), achieving the original tcsh behavior without a builtin option is non-trivial. The takeaway from my long-winded introduction is that sometimes it can be small things that prevent people from jumping over to zsh. My previously posted patch still merges cleanly with current master. If it was actually just still in the merge queue and not forgotten, and I didn't wait long enough, I apologize for the bump. Tim On 2023-07-18 02:54:11, Tim Eliseo wrote: > Hi all! > > This is my first post to the group. I’d been using tcsh as an > interactive shell since way back when it was still cool, before zsh or > bash even existed. Zsh is the first shell that’s a worthy successor. > One of the small things that kept me from jumping to bash (along with > everyone else in the Linux world) is that it doesn’t have a proper > implementation of asynchronous notify of job completion (-b), which > zsh does. Another thing that bugged me about bash was that there is no > clean way to emulate tcsh’s dextract option, which rearranges the > pushd stack differently. I eventually discovered that zsh can do the > basic function through the cd/chdir builtin with the auto_pushd option > set, but coding a pushd replacement function was complicated to get > right for all option cases (see attached). > > However, I found that adding this pushd mode to zsh natively was > trivial (simply testing for the new option in one place), and I’m > still baffled why it wasn’t included a long time ago while someone was > looking for ways to increase compatibility with other shells. The > attached patch (based on the current master branch) does just that, > and I hope you see fit to merge it into the codebase. I believe I’ve > done all the appropriate option handling, documentation, and unit test > to make this painless. I didn’t write a ChangeLog entry since I wasn’t > sure of the appropriate format, or how to derive the number. (Is that > an SVN revision number?) > > Tim >